allow structures to be overriden

This commit is contained in:
Skillz
2020-09-12 11:03:27 -04:00
parent 6266b044f7
commit 035cb1360d
11 changed files with 107 additions and 73 deletions
+7 -5
View File
@@ -1,9 +1,11 @@
import { RoleData } from "../types/role.ts";
export const createRole = (data: RoleData) => ({
...data,
/** The @ mention of the role in a string. */
mention: `<@&${data.id}>`,
});
export function createRole(data: RoleData) {
return {
...data,
/** The @ mention of the role in a string. */
mention: `<@&${data.id}>`,
};
}
export interface Role extends ReturnType<typeof createRole> {}