feat(Role): add flags (#9694)

* feat(Role): add `flags`

* types: use RoleFlags enum

* Update packages/discord.js/typings/index.d.ts

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>

---------

Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
This commit is contained in:
n1ck_pro
2023-08-10 23:20:13 +02:00
committed by GitHub
parent 692f0fc96d
commit 3b18e5b08d
5 changed files with 52 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ import {
APIGuildOnboardingPromptOption,
GuildOnboardingPromptType,
AttachmentFlags,
RoleFlags,
} from 'discord-api-types/v10';
import { ChildProcess } from 'node:child_process';
import { EventEmitter } from 'node:events';
@@ -2524,6 +2525,7 @@ export class Role extends Base {
public get createdAt(): Date;
public get createdTimestamp(): number;
public get editable(): boolean;
public flags: RoleFlagsBitField;
public guild: Guild;
public get hexColor(): HexColorString;
public hoist: boolean;
@@ -2559,6 +2561,13 @@ export class Role extends Base {
public toString(): RoleMention;
}
export type RoleFlagsString = keyof typeof RoleFlags;
export class RoleFlagsBitField extends BitField<RoleFlagsString> {
public static Flags: typeof RoleFlags;
public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number;
}
export class StringSelectMenuInteraction<
Cached extends CacheType = CacheType,
> extends MessageComponentInteraction<Cached> {