mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
types: add role types (#717)
* move perm types * types: add role types * types: add roletags types Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { SnakeCaseProps } from "../util.ts";
|
||||
import { RoleTags } from "./role_tags.ts";
|
||||
|
||||
export interface Role {
|
||||
/** Role id */
|
||||
id: string;
|
||||
/** Role name */
|
||||
name: string;
|
||||
/** Integer representation of hexadecimal color code */
|
||||
color: number;
|
||||
/** If this role is showed seperately in the user listing */
|
||||
hoist: boolean;
|
||||
/** Position of this role */
|
||||
position: number;
|
||||
/** Permission bit set */
|
||||
permissions: string;
|
||||
/** Whether this role is managed by an integration */
|
||||
managed: boolean;
|
||||
/** Whether this role is mentionable */
|
||||
mentionable: boolean;
|
||||
/** The tags this role has */
|
||||
tags?: RoleTags;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
|
||||
export type DiscordRole = SnakeCaseProps<Role>;
|
||||
@@ -0,0 +1,13 @@
|
||||
import { SnakeCaseProps } from "../util.ts";
|
||||
|
||||
export interface RoleTags {
|
||||
/** The id of the bot this role belongs to */
|
||||
botId?: string;
|
||||
/** The id of the integration this role belongs to */
|
||||
integrationId?: string;
|
||||
/** Whether this is the guild's premium subscriber role */
|
||||
premiumSubscriber?: null;
|
||||
}
|
||||
|
||||
/** https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure */
|
||||
export type DiscordRoleTags = SnakeCaseProps<RoleTags>;
|
||||
Reference in New Issue
Block a user