mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
v7 stuff lots of stuff
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { RoleData } from "../types/role.ts";
|
||||
import { calculatePermissions } from "../utils/permissions.ts";
|
||||
|
||||
export const createRole = (data: RoleData) => ({
|
||||
...data,
|
||||
permissions: calculatePermissions(BigInt(data.permissions_new)),
|
||||
/** The @ mention of the role in a string. */
|
||||
mention: `<@&${data.id}>`,
|
||||
});
|
||||
|
||||
export interface Role extends ReturnType<typeof createRole> {}
|
||||
Reference in New Issue
Block a user