mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
feat(Role): role tags (#4628)
* feat(Role): role tags * fix(RoleManager): fix js docs and mark nullable * fix(Role): typings tags are be null, not undefined * fix(Role): getters should actually return a bool * fix(RoleManager): typo * fix(Role): should always return a boolean * fix(Gmrm): getter should return null * fix(RoleManager): getters should return null * fix: typing getters should return null * fix(Role): docs grammar and consistency * chore: prefer in operator over Reflect#has * feat(GmRm): botRole getter * fix(GmRm): use the actual properties * feat(RoleManager): rem myRole in pref o botRoleFor * fix(Role): remove obsolete is- getters * fix: checking tags after getter removal * chore: identifier naming consistency * chore: prefer explicit true type over boolean * fix: typo * feat(Integration): Add Integration#roles getter (#1) * fix(RoleManager): remove bot check r:partials * feat(RoleManager): robustness against uncached u * docs: possibly undefined Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
This commit is contained in:
13
typings/index.d.ts
vendored
13
typings/index.d.ts
vendored
@@ -904,6 +904,7 @@ declare module 'discord.js' {
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
public role: Role;
|
||||
public readonly roles: Collection<Snowflake, Role>;
|
||||
public syncedAt: number;
|
||||
public syncing: boolean;
|
||||
public type: string;
|
||||
@@ -1287,6 +1288,7 @@ declare module 'discord.js' {
|
||||
public permissions: Readonly<Permissions>;
|
||||
public readonly position: number;
|
||||
public rawPosition: number;
|
||||
public tags: RoleTagData | null;
|
||||
public comparePositionTo(role: Role): number;
|
||||
public delete(reason?: string): Promise<Role>;
|
||||
public edit(data: RoleData, reason?: string): Promise<Role>;
|
||||
@@ -1954,6 +1956,8 @@ declare module 'discord.js' {
|
||||
public readonly hoist: Role | null;
|
||||
public readonly color: Role | null;
|
||||
public readonly highest: Role;
|
||||
public readonly premiumSubscriberRole: Role | null;
|
||||
public readonly botRole: Role | null;
|
||||
public member: GuildMember;
|
||||
public guild: Guild;
|
||||
|
||||
@@ -2015,7 +2019,8 @@ declare module 'discord.js' {
|
||||
public readonly everyone: Role;
|
||||
public readonly highest: Role;
|
||||
public guild: Guild;
|
||||
|
||||
public readonly premiumSubscriberRole: Role | null;
|
||||
public botRoleFor(user: UserResolvable): Role | null;
|
||||
public create(options?: { data?: RoleData; reason?: string }): Promise<Role>;
|
||||
public fetch(id: Snowflake, cache?: boolean, force?: boolean): Promise<Role | null>;
|
||||
public fetch(id?: Snowflake, cache?: boolean, force?: boolean): Promise<Collection<Snowflake, Role>>;
|
||||
@@ -3115,6 +3120,12 @@ declare module 'discord.js' {
|
||||
|
||||
type RoleResolvable = Role | string;
|
||||
|
||||
interface RoleTagData {
|
||||
botID?: Snowflake;
|
||||
integrationID?: Snowflake;
|
||||
premiumSubscriberRole?: true;
|
||||
}
|
||||
|
||||
type ShardingManagerMode = 'process' | 'worker';
|
||||
|
||||
type Snowflake = string;
|
||||
|
||||
Reference in New Issue
Block a user