mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
Add Role.tags property
This commit is contained in:
@@ -6,6 +6,11 @@ export async function createRole(data: RoleData) {
|
||||
...data,
|
||||
/** The @ mention of the role in a string. */
|
||||
mention: `<@&${data.id}>`,
|
||||
tags: {
|
||||
botID: data.tags?.botID,
|
||||
premiumSubscriber: "premium_subscriber" in (data.tags ?? {}),
|
||||
integrationID: data.tags?.integrationID,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -15,4 +15,12 @@ export interface RoleData {
|
||||
managed: boolean;
|
||||
/** whether this role is mentionable */
|
||||
mentionable: boolean;
|
||||
/** */
|
||||
tags: RoleTags | null;
|
||||
}
|
||||
|
||||
export interface RoleTags {
|
||||
botID?: string;
|
||||
premiumSubscriber?: boolean;
|
||||
integrationID?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user