GuildRole

Signature

export declare class GuildRole extends DiscordBase

Properties

get createdTimestamp(): number;

Create a timestamp for the current object.

get createdAt(): Date;

createdAt gets the creation Date instace of the current object.

icon?: string | null | undefined;
tags?: { botId?: string | undefined; premiumSubscriber?: null | undefined; integrationId?: string | undefined; subscriptionListingId?: string | undefined; availableForPurchase?: null | undefined; guildConnections?: null | undefined; } | undefined;
colors: { primaryColor: number; secondaryColor: number | null; tertiaryColor: number | null; };

Methods

delete(reason?: string): Promise<void>;
toString(): `<@&${string}>`;

Returns a string representation of an object.

static methods(ctx: MethodContext<{    guildId: string;}>): {    create: (body: RESTPostAPIGuildRoleJSONBody) => Promise<GuildRoleStructure>;    list: (force?: boolean) => Promise<GuildRoleStructure[]>;    edit: (roleId: string, body: RESTPatchAPIGuildRoleJSONBody, reason?: string) => Promise<GuildRoleStructure>;    delete: (roleId: string, reason?: string) => Promise<void>;    editPositions: (body: RESTPatchAPIGuildRolePositionsJSONBody) => Promise<GuildRoleStructure[]>;    memberCounts: () => Promise<RESTGetAPIGuildRoleMemberCountsResult>;};