mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 16:30:08 +00:00
12 lines
285 B
TypeScript
12 lines
285 B
TypeScript
import { RoleData } from "../types/role.ts";
|
|
|
|
export const createRole = (data: RoleData) => ({
|
|
...data,
|
|
/** The entire raw Role data */
|
|
raw: data,
|
|
/** The @ mention of the role in a string. */
|
|
mention: `<@&${data.id}>`,
|
|
});
|
|
|
|
export type Role = ReturnType<typeof createRole>;
|