mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
refactor: add some more consistency (#3842)
* cleanup(StreamDispatcher): remove old 'end' event * fix(StreamDispatcher): only listen to finish event once * refactor(VoiceWebSocket): use `connection.client` in favour of `connection.voiceManager.client` * fix(VoiceWebSocket): use `client.clearInterval` in favour of `clearInterval` * refactor: destructure EventEmitter * refactor: destructure EventEmitter from events * refactor: use EventEmitter.off in favour of EventEmitter.removeListener * style: order typings alphabetically * oops * fix indent * style: alphabetically organize imports * style: remove extra line * Revert "style: remove extra line" This reverts commit96e182ed69. * Revert "style: alphabetically organize imports" This reverts commit02aee9b06d. * Revert "refactor: destructure EventEmitter from events" This reverts commit9953b4d267. * Revert "refactor: destructure EventEmitter" This reverts commit930d7751ab. * Revert "fix(StreamDispatcher): only listen to finish event once" This reverts commit485a6430a8. * refactor: use .removeListener instead of .off
This commit is contained in:
@@ -35,7 +35,7 @@ class VoiceWebSocket extends EventEmitter {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get client() {
|
get client() {
|
||||||
return this.connection.voiceManager.client;
|
return this.connection.client;
|
||||||
}
|
}
|
||||||
|
|
||||||
shutdown() {
|
shutdown() {
|
||||||
@@ -232,7 +232,7 @@ class VoiceWebSocket extends EventEmitter {
|
|||||||
* @event VoiceWebSocket#warn
|
* @event VoiceWebSocket#warn
|
||||||
*/
|
*/
|
||||||
this.emit('warn', 'A voice heartbeat interval is being overwritten');
|
this.emit('warn', 'A voice heartbeat interval is being overwritten');
|
||||||
clearInterval(this.heartbeatInterval);
|
this.client.clearInterval(this.heartbeatInterval);
|
||||||
}
|
}
|
||||||
this.heartbeatInterval = this.client.setInterval(this.sendHeartbeat.bind(this), interval);
|
this.heartbeatInterval = this.client.setInterval(this.sendHeartbeat.bind(this), interval);
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ class VoiceWebSocket extends EventEmitter {
|
|||||||
this.emit('warn', 'Tried to clear a heartbeat interval that does not exist');
|
this.emit('warn', 'Tried to clear a heartbeat interval that does not exist');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
clearInterval(this.heartbeatInterval);
|
this.client.clearInterval(this.heartbeatInterval);
|
||||||
this.heartbeatInterval = null;
|
this.heartbeatInterval = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,11 +175,11 @@ class WebSocketShard extends EventEmitter {
|
|||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const cleanup = () => {
|
const cleanup = () => {
|
||||||
this.off(ShardEvents.CLOSE, onClose);
|
this.removeListener(ShardEvents.CLOSE, onClose);
|
||||||
this.off(ShardEvents.READY, onReady);
|
this.removeListener(ShardEvents.READY, onReady);
|
||||||
this.off(ShardEvents.RESUMED, onResumed);
|
this.removeListener(ShardEvents.RESUMED, onResumed);
|
||||||
this.off(ShardEvents.INVALID_SESSION, onInvalidOrDestroyed);
|
this.removeListener(ShardEvents.INVALID_SESSION, onInvalidOrDestroyed);
|
||||||
this.off(ShardEvents.DESTROYED, onInvalidOrDestroyed);
|
this.removeListener(ShardEvents.DESTROYED, onInvalidOrDestroyed);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onReady = () => {
|
const onReady = () => {
|
||||||
|
|||||||
@@ -230,8 +230,8 @@ class Collector extends EventEmitter {
|
|||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
const tick = () => {
|
const tick = () => {
|
||||||
this.off('collect', tick);
|
this.removeListener('collect', tick);
|
||||||
this.off('end', tick);
|
this.removeListener('end', tick);
|
||||||
return resolve();
|
return resolve();
|
||||||
};
|
};
|
||||||
this.on('collect', tick);
|
this.on('collect', tick);
|
||||||
@@ -240,7 +240,7 @@ class Collector extends EventEmitter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
this.off('collect', onCollect);
|
this.removeListener('collect', onCollect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
464
typings/index.d.ts
vendored
464
typings/index.d.ts
vendored
@@ -244,17 +244,6 @@ declare module 'discord.js' {
|
|||||||
public once(event: string, listener: (...args: any[]) => void): this;
|
public once(event: string, listener: (...args: any[]) => void): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ClientVoiceManager {
|
|
||||||
constructor(client: Client);
|
|
||||||
public readonly client: Client;
|
|
||||||
public connections: Collection<Snowflake, VoiceConnection>;
|
|
||||||
public broadcasts: VoiceBroadcast[];
|
|
||||||
|
|
||||||
private joinChannel(channel: VoiceChannel): Promise<VoiceConnection>;
|
|
||||||
|
|
||||||
public createBroadcast(): VoiceBroadcast;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ClientApplication extends Base {
|
export class ClientApplication extends Base {
|
||||||
constructor(client: Client, data: object);
|
constructor(client: Client, data: object);
|
||||||
public botPublic: boolean | null;
|
public botPublic: boolean | null;
|
||||||
@@ -275,34 +264,6 @@ declare module 'discord.js' {
|
|||||||
public toString(): string;
|
public toString(): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Team extends Base {
|
|
||||||
constructor(client: Client, data: object);
|
|
||||||
public id: Snowflake;
|
|
||||||
public name: string;
|
|
||||||
public icon: string | null;
|
|
||||||
public ownerID: Snowflake | null;
|
|
||||||
public members: Collection<Snowflake, TeamMember>;
|
|
||||||
|
|
||||||
public readonly owner: TeamMember;
|
|
||||||
public readonly createdAt: Date;
|
|
||||||
public readonly createdTimestamp: number;
|
|
||||||
|
|
||||||
public iconURL(options?: ImageURLOptions): string;
|
|
||||||
public toJSON(): object;
|
|
||||||
public toString(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class TeamMember extends Base {
|
|
||||||
constructor(team: Team, data: object);
|
|
||||||
public team: Team;
|
|
||||||
public readonly id: Snowflake;
|
|
||||||
public permissions: string[];
|
|
||||||
public membershipState: MembershipStates;
|
|
||||||
public user: User;
|
|
||||||
|
|
||||||
public toString(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ClientUser extends User {
|
export class ClientUser extends User {
|
||||||
public mfaEnabled: boolean;
|
public mfaEnabled: boolean;
|
||||||
public verified: boolean;
|
public verified: boolean;
|
||||||
@@ -315,6 +276,17 @@ declare module 'discord.js' {
|
|||||||
public setUsername(username: string): Promise<ClientUser>;
|
public setUsername(username: string): Promise<ClientUser>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ClientVoiceManager {
|
||||||
|
constructor(client: Client);
|
||||||
|
public readonly client: Client;
|
||||||
|
public connections: Collection<Snowflake, VoiceConnection>;
|
||||||
|
public broadcasts: VoiceBroadcast[];
|
||||||
|
|
||||||
|
private joinChannel(channel: VoiceChannel): Promise<VoiceConnection>;
|
||||||
|
|
||||||
|
public createBroadcast(): VoiceBroadcast;
|
||||||
|
}
|
||||||
|
|
||||||
export abstract class Collector<K, V> extends EventEmitter {
|
export abstract class Collector<K, V> extends EventEmitter {
|
||||||
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
|
constructor(client: Client, filter: CollectorFilter, options?: CollectorOptions);
|
||||||
private _timeout: NodeJS.Timer | null;
|
private _timeout: NodeJS.Timer | null;
|
||||||
@@ -822,18 +794,6 @@ declare module 'discord.js' {
|
|||||||
public updateOverwrite(userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOption, reason?: string): Promise<this>;
|
public updateOverwrite(userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOption, reason?: string): Promise<this>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class StoreChannel extends GuildChannel {
|
|
||||||
constructor(guild: Guild, data?: object);
|
|
||||||
public nsfw: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class PartialGroupDMChannel extends Channel {
|
|
||||||
constructor(client: Client, data: object);
|
|
||||||
public name: string;
|
|
||||||
public icon: string | null;
|
|
||||||
public iconURL(options?: ImageURLOptions): string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class GuildEmoji extends Emoji {
|
export class GuildEmoji extends Emoji {
|
||||||
constructor(client: Client, data: object, guild: Guild);
|
constructor(client: Client, data: object, guild: Guild);
|
||||||
private _roles: string[];
|
private _roles: string[];
|
||||||
@@ -889,6 +849,14 @@ declare module 'discord.js' {
|
|||||||
public valueOf(): string;
|
public valueOf(): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class HTTPError extends Error {
|
||||||
|
constructor(message: string, name: string, code: number, method: string, path: string);
|
||||||
|
public code: number;
|
||||||
|
public method: string;
|
||||||
|
public name: string;
|
||||||
|
public path: string;
|
||||||
|
}
|
||||||
|
|
||||||
export class Integration extends Base {
|
export class Integration extends Base {
|
||||||
constructor(client: Client, data: object, guild: Guild);
|
constructor(client: Client, data: object, guild: Guild);
|
||||||
public account: IntegrationAccount;
|
public account: IntegrationAccount;
|
||||||
@@ -908,14 +876,6 @@ declare module 'discord.js' {
|
|||||||
public sync(): Promise<Integration>;
|
public sync(): Promise<Integration>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HTTPError extends Error {
|
|
||||||
constructor(message: string, name: string, code: number, method: string, path: string);
|
|
||||||
public code: number;
|
|
||||||
public method: string;
|
|
||||||
public name: string;
|
|
||||||
public path: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Invite extends Base {
|
export class Invite extends Base {
|
||||||
constructor(client: Client, data: object);
|
constructor(client: Client, data: object);
|
||||||
public channel: GuildChannel | PartialGroupDMChannel;
|
public channel: GuildChannel | PartialGroupDMChannel;
|
||||||
@@ -941,11 +901,6 @@ declare module 'discord.js' {
|
|||||||
public toString(): string;
|
public toString(): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MessageFlags extends BitField<MessageFlagsString> {
|
|
||||||
public static FLAGS: Record<MessageFlagsString, number>;
|
|
||||||
public static resolve(bit?: BitFieldResolvable<MessageFlagsString>): number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Message extends Base {
|
export class Message extends Base {
|
||||||
constructor(client: Client, data: object, channel: TextChannel | DMChannel);
|
constructor(client: Client, data: object, channel: TextChannel | DMChannel);
|
||||||
private _edits: Message[];
|
private _edits: Message[];
|
||||||
@@ -1072,6 +1027,11 @@ declare module 'discord.js' {
|
|||||||
public static normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[];
|
public static normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class MessageFlags extends BitField<MessageFlagsString> {
|
||||||
|
public static FLAGS: Record<MessageFlagsString, number>;
|
||||||
|
public static resolve(bit?: BitFieldResolvable<MessageFlagsString>): number;
|
||||||
|
}
|
||||||
|
|
||||||
export class MessageMentions {
|
export class MessageMentions {
|
||||||
constructor(message: Message, users: object[] | Collection<Snowflake, User>, roles: Snowflake[] | Collection<Snowflake, Role>, everyone: boolean);
|
constructor(message: Message, users: object[] | Collection<Snowflake, User>, roles: Snowflake[] | Collection<Snowflake, Role>, everyone: boolean);
|
||||||
private _channels: Collection<Snowflake, GuildChannel> | null;
|
private _channels: Collection<Snowflake, GuildChannel> | null;
|
||||||
@@ -1114,6 +1074,23 @@ declare module 'discord.js' {
|
|||||||
public toJSON(): object;
|
public toJSON(): object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class NewsChannel extends TextBasedChannel(GuildChannel) {
|
||||||
|
constructor(guild: Guild, data?: object);
|
||||||
|
public messages: MessageManager;
|
||||||
|
public nsfw: boolean;
|
||||||
|
public topic: string | null;
|
||||||
|
public createWebhook(name: string, options?: { avatar?: BufferResolvable | Base64Resolvable; reason?: string; }): Promise<Webhook>;
|
||||||
|
public setNSFW(nsfw: boolean, reason?: string): Promise<NewsChannel>;
|
||||||
|
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PartialGroupDMChannel extends Channel {
|
||||||
|
constructor(client: Client, data: object);
|
||||||
|
public name: string;
|
||||||
|
public icon: string | null;
|
||||||
|
public iconURL(options?: ImageURLOptions): string | null;
|
||||||
|
}
|
||||||
|
|
||||||
export class PermissionOverwrites {
|
export class PermissionOverwrites {
|
||||||
constructor(guildChannel: GuildChannel, data?: object);
|
constructor(guildChannel: GuildChannel, data?: object);
|
||||||
public allow: Readonly<Permissions>;
|
public allow: Readonly<Permissions>;
|
||||||
@@ -1321,7 +1298,15 @@ declare module 'discord.js' {
|
|||||||
public static generate(timestamp?: number | Date): Snowflake;
|
public static generate(timestamp?: number | Date): Snowflake;
|
||||||
}
|
}
|
||||||
|
|
||||||
function VolumeMixin<T>(base: Constructable<T>): Constructable<T & VolumeInterface>;
|
export class Speaking extends BitField<SpeakingString> {
|
||||||
|
public static FLAGS: Record<SpeakingString, number>;
|
||||||
|
public static resolve(bit?: BitFieldResolvable<SpeakingString>): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class StoreChannel extends GuildChannel {
|
||||||
|
constructor(guild: Guild, data?: object);
|
||||||
|
public nsfw: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
class StreamDispatcher extends VolumeMixin(Writable) {
|
class StreamDispatcher extends VolumeMixin(Writable) {
|
||||||
constructor(player: object, options?: StreamOptions, streams?: object);
|
constructor(player: object, options?: StreamOptions, streams?: object);
|
||||||
@@ -1357,11 +1342,6 @@ declare module 'discord.js' {
|
|||||||
public once(event: string, listener: (...args: any[]) => void): this;
|
public once(event: string, listener: (...args: any[]) => void): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Speaking extends BitField<SpeakingString> {
|
|
||||||
public static FLAGS: Record<SpeakingString, number>;
|
|
||||||
public static resolve(bit?: BitFieldResolvable<SpeakingString>): number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Structures {
|
export class Structures {
|
||||||
public static get<K extends keyof Extendable>(structure: K): Extendable[K];
|
public static get<K extends keyof Extendable>(structure: K): Extendable[K];
|
||||||
public static get(structure: string): (...args: any[]) => void;
|
public static get(structure: string): (...args: any[]) => void;
|
||||||
@@ -1374,6 +1354,34 @@ declare module 'discord.js' {
|
|||||||
public static resolve(bit?: BitFieldResolvable<SystemChannelFlagsString>): number;
|
public static resolve(bit?: BitFieldResolvable<SystemChannelFlagsString>): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class Team extends Base {
|
||||||
|
constructor(client: Client, data: object);
|
||||||
|
public id: Snowflake;
|
||||||
|
public name: string;
|
||||||
|
public icon: string | null;
|
||||||
|
public ownerID: Snowflake | null;
|
||||||
|
public members: Collection<Snowflake, TeamMember>;
|
||||||
|
|
||||||
|
public readonly owner: TeamMember;
|
||||||
|
public readonly createdAt: Date;
|
||||||
|
public readonly createdTimestamp: number;
|
||||||
|
|
||||||
|
public iconURL(options?: ImageURLOptions): string;
|
||||||
|
public toJSON(): object;
|
||||||
|
public toString(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class TeamMember extends Base {
|
||||||
|
constructor(team: Team, data: object);
|
||||||
|
public team: Team;
|
||||||
|
public readonly id: Snowflake;
|
||||||
|
public permissions: string[];
|
||||||
|
public membershipState: MembershipStates;
|
||||||
|
public user: User;
|
||||||
|
|
||||||
|
public toString(): string;
|
||||||
|
}
|
||||||
|
|
||||||
export class TextChannel extends TextBasedChannel(GuildChannel) {
|
export class TextChannel extends TextBasedChannel(GuildChannel) {
|
||||||
constructor(guild: Guild, data?: object);
|
constructor(guild: Guild, data?: object);
|
||||||
public messages: MessageManager;
|
public messages: MessageManager;
|
||||||
@@ -1386,16 +1394,6 @@ declare module 'discord.js' {
|
|||||||
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NewsChannel extends TextBasedChannel(GuildChannel) {
|
|
||||||
constructor(guild: Guild, data?: object);
|
|
||||||
public messages: MessageManager;
|
|
||||||
public nsfw: boolean;
|
|
||||||
public topic: string | null;
|
|
||||||
public createWebhook(name: string, options?: { avatar?: BufferResolvable | Base64Resolvable; reason?: string; }): Promise<Webhook>;
|
|
||||||
public setNSFW(nsfw: boolean, reason?: string): Promise<NewsChannel>;
|
|
||||||
public fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class User extends PartialTextBasedChannel(Base) {
|
export class User extends PartialTextBasedChannel(Base) {
|
||||||
constructor(client: Client, data: object);
|
constructor(client: Client, data: object);
|
||||||
public avatar: string | null;
|
public avatar: string | null;
|
||||||
@@ -1749,6 +1747,22 @@ declare module 'discord.js' {
|
|||||||
public resolveID(resolvable: R): K | null;
|
public resolveID(resolvable: R): K | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class GuildChannelManager extends BaseManager<Snowflake, GuildChannel, GuildChannelResolvable> {
|
||||||
|
constructor(guild: Guild, iterable?: Iterable<any>);
|
||||||
|
public guild: Guild;
|
||||||
|
public create(name: string, options: GuildCreateChannelOptions & { type: 'voice'; }): Promise<VoiceChannel>;
|
||||||
|
public create(name: string, options: GuildCreateChannelOptions & { type: 'category'; }): Promise<CategoryChannel>;
|
||||||
|
public create(name: string, options?: GuildCreateChannelOptions & { type?: 'text'; }): Promise<TextChannel>;
|
||||||
|
public create(name: string, options: GuildCreateChannelOptions): Promise<TextChannel | VoiceChannel | CategoryChannel>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GuildEmojiManager extends BaseManager<Snowflake, GuildEmoji, EmojiResolvable> {
|
||||||
|
constructor(guild: Guild, iterable?: Iterable<any>);
|
||||||
|
public guild: Guild;
|
||||||
|
public create(attachment: BufferResolvable | Base64Resolvable, name: string, options?: GuildEmojiCreateOptions): Promise<GuildEmoji>;
|
||||||
|
public resolveIdentifier(emoji: EmojiIdentifierResolvable): string | null;
|
||||||
|
}
|
||||||
|
|
||||||
export class GuildEmojiRoleManager {
|
export class GuildEmojiRoleManager {
|
||||||
constructor(emoji: GuildEmoji);
|
constructor(emoji: GuildEmoji);
|
||||||
public emoji: GuildEmoji;
|
public emoji: GuildEmoji;
|
||||||
@@ -1759,26 +1773,20 @@ declare module 'discord.js' {
|
|||||||
public remove(roleOrRoles: RoleResolvable | RoleResolvable[] | Collection<Snowflake, Role>): Promise<GuildEmoji>;
|
public remove(roleOrRoles: RoleResolvable | RoleResolvable[] | Collection<Snowflake, Role>): Promise<GuildEmoji>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GuildEmojiManager extends BaseManager<Snowflake, GuildEmoji, EmojiResolvable> {
|
export class GuildManager extends BaseManager<Snowflake, Guild, GuildResolvable> {
|
||||||
constructor(guild: Guild, iterable?: Iterable<any>);
|
constructor(client: Client, iterable?: Iterable<any>);
|
||||||
public guild: Guild;
|
public create(name: string, options?: { region?: string; icon: BufferResolvable | Base64Resolvable | null; }): Promise<Guild>;
|
||||||
public create(attachment: BufferResolvable | Base64Resolvable, name: string, options?: GuildEmojiCreateOptions): Promise<GuildEmoji>;
|
|
||||||
public resolveIdentifier(emoji: EmojiIdentifierResolvable): string | null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GuildChannelManager extends BaseManager<Snowflake, GuildChannel, GuildChannelResolvable> {
|
export class GuildMemberManager extends BaseManager<Snowflake, GuildMember, GuildMemberResolvable> {
|
||||||
constructor(guild: Guild, iterable?: Iterable<any>);
|
constructor(guild: Guild, iterable?: Iterable<any>);
|
||||||
public guild: Guild;
|
public guild: Guild;
|
||||||
public create(name: string, options: GuildCreateChannelOptions & { type: 'voice'; }): Promise<VoiceChannel>;
|
public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
|
||||||
public create(name: string, options: GuildCreateChannelOptions & { type: 'category'; }): Promise<CategoryChannel>;
|
public fetch(options: UserResolvable | FetchMemberOptions): Promise<GuildMember>;
|
||||||
public create(name: string, options?: GuildCreateChannelOptions & { type?: 'text'; }): Promise<TextChannel>;
|
public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
||||||
public create(name: string, options: GuildCreateChannelOptions): Promise<TextChannel | VoiceChannel | CategoryChannel>;
|
public prune(options: GuildPruneMembersOptions & { dry?: false; count: false; }): Promise<null>;
|
||||||
}
|
public prune(options?: GuildPruneMembersOptions): Promise<number>;
|
||||||
|
public unban(user: UserResolvable, reason?: string): Promise<User>;
|
||||||
// Hacky workaround because changing the signature of an overridden method errors
|
|
||||||
class OverridableManager<V, K, R = any> extends BaseManager<V, K, R> {
|
|
||||||
public add(data: any, cache: any): any;
|
|
||||||
public set(key: any): any;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GuildMemberRoleManager extends OverridableManager<Snowflake, Role, RoleResolvable> {
|
export class GuildMemberRoleManager extends OverridableManager<Snowflake, Role, RoleResolvable> {
|
||||||
@@ -1794,22 +1802,6 @@ declare module 'discord.js' {
|
|||||||
public remove(roleOrRoles: RoleResolvable | RoleResolvable[] | Collection<Snowflake, Role>, reason?: string): Promise<GuildMember>;
|
public remove(roleOrRoles: RoleResolvable | RoleResolvable[] | Collection<Snowflake, Role>, reason?: string): Promise<GuildMember>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GuildMemberManager extends BaseManager<Snowflake, GuildMember, GuildMemberResolvable> {
|
|
||||||
constructor(guild: Guild, iterable?: Iterable<any>);
|
|
||||||
public guild: Guild;
|
|
||||||
public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
|
|
||||||
public fetch(options: UserResolvable | FetchMemberOptions): Promise<GuildMember>;
|
|
||||||
public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
|
|
||||||
public prune(options: GuildPruneMembersOptions & { dry?: false; count: false; }): Promise<null>;
|
|
||||||
public prune(options?: GuildPruneMembersOptions): Promise<number>;
|
|
||||||
public unban(user: UserResolvable, reason?: string): Promise<User>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class GuildManager extends BaseManager<Snowflake, Guild, GuildResolvable> {
|
|
||||||
constructor(client: Client, iterable?: Iterable<any>);
|
|
||||||
public create(name: string, options?: { region?: string; icon: BufferResolvable | Base64Resolvable | null; }): Promise<Guild>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class MessageManager extends BaseManager<Snowflake, Message, MessageResolvable> {
|
export class MessageManager extends BaseManager<Snowflake, Message, MessageResolvable> {
|
||||||
constructor(channel: TextChannel | DMChannel, iterable?: Iterable<any>);
|
constructor(channel: TextChannel | DMChannel, iterable?: Iterable<any>);
|
||||||
public channel: TextBasedChannelFields;
|
public channel: TextBasedChannelFields;
|
||||||
@@ -1820,6 +1812,12 @@ declare module 'discord.js' {
|
|||||||
public delete(message: MessageResolvable, reason?: string): Promise<void>;
|
public delete(message: MessageResolvable, reason?: string): Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hacky workaround because changing the signature of an overridden method errors
|
||||||
|
class OverridableManager<V, K, R = any> extends BaseManager<V, K, R> {
|
||||||
|
public add(data: any, cache: any): any;
|
||||||
|
public set(key: any): any;
|
||||||
|
}
|
||||||
|
|
||||||
export class PresenceManager extends BaseManager<Snowflake, Presence, PresenceResolvable> {
|
export class PresenceManager extends BaseManager<Snowflake, Presence, PresenceResolvable> {
|
||||||
constructor(client: Client, iterable?: Iterable<any>);
|
constructor(client: Client, iterable?: Iterable<any>);
|
||||||
}
|
}
|
||||||
@@ -1894,6 +1892,8 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
function WebhookMixin<T>(Base?: Constructable<T>): Constructable<T & WebhookFields>;
|
function WebhookMixin<T>(Base?: Constructable<T>): Constructable<T & WebhookFields>;
|
||||||
|
|
||||||
|
function VolumeMixin<T>(base: Constructable<T>): Constructable<T & VolumeInterface>;
|
||||||
|
|
||||||
interface WebhookFields {
|
interface WebhookFields {
|
||||||
id: Snowflake;
|
id: Snowflake;
|
||||||
readonly createdAt: Date;
|
readonly createdAt: Date;
|
||||||
@@ -1932,11 +1932,13 @@ declare module 'discord.js' {
|
|||||||
| 'WATCHING'
|
| 'WATCHING'
|
||||||
| 'CUSTOM_STATUS';
|
| 'CUSTOM_STATUS';
|
||||||
|
|
||||||
type MessageFlagsString = 'CROSSPOSTED'
|
interface AddGuildMemberOptions {
|
||||||
| 'IS_CROSSPOST'
|
accessToken: string;
|
||||||
| 'SUPPRESS_EMBEDS'
|
nick?: string;
|
||||||
| 'SOURCE_MESSAGE_DELETED'
|
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
||||||
| 'URGENT';
|
mute?: boolean;
|
||||||
|
deaf?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface APIErrror {
|
interface APIErrror {
|
||||||
UNKNOWN_ACCOUNT: number;
|
UNKNOWN_ACCOUNT: number;
|
||||||
@@ -1985,25 +1987,12 @@ declare module 'discord.js' {
|
|||||||
REACTION_BLOCKED: number;
|
REACTION_BLOCKED: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AddGuildMemberOptions {
|
|
||||||
accessToken: string;
|
|
||||||
nick?: string;
|
|
||||||
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
|
||||||
mute?: boolean;
|
|
||||||
deaf?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AuditLogChange {
|
interface AuditLogChange {
|
||||||
key: string;
|
key: string;
|
||||||
old?: any;
|
old?: any;
|
||||||
new?: any;
|
new?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ImageURLOptions {
|
|
||||||
format?: ImageExt;
|
|
||||||
size?: ImageSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AwaitMessagesOptions extends MessageCollectorOptions {
|
interface AwaitMessagesOptions extends MessageCollectorOptions {
|
||||||
errors?: string[];
|
errors?: string[];
|
||||||
}
|
}
|
||||||
@@ -2084,6 +2073,21 @@ declare module 'discord.js' {
|
|||||||
http?: HTTPOptions;
|
http?: HTTPOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
||||||
|
|
||||||
|
interface ClientPresenceStatusData {
|
||||||
|
web?: ClientPresenceStatus;
|
||||||
|
mobile?: ClientPresenceStatus;
|
||||||
|
desktop?: ClientPresenceStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CloseEvent {
|
||||||
|
wasClean: boolean;
|
||||||
|
code: number;
|
||||||
|
reason: string;
|
||||||
|
target: WebSocket;
|
||||||
|
}
|
||||||
|
|
||||||
type CollectorFilter = (...args: any[]) => boolean;
|
type CollectorFilter = (...args: any[]) => boolean;
|
||||||
|
|
||||||
interface CollectorOptions {
|
interface CollectorOptions {
|
||||||
@@ -2122,6 +2126,13 @@ declare module 'discord.js' {
|
|||||||
| number
|
| number
|
||||||
| string;
|
| string;
|
||||||
|
|
||||||
|
interface CrosspostedChannel {
|
||||||
|
channelID: Snowflake;
|
||||||
|
guildID: Snowflake;
|
||||||
|
type: keyof typeof ChannelType;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface DeconstructedSnowflake {
|
interface DeconstructedSnowflake {
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
readonly date: Date;
|
readonly date: Date;
|
||||||
@@ -2133,11 +2144,6 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
type DefaultMessageNotifications = 'ALL' | 'MENTIONS';
|
type DefaultMessageNotifications = 'ALL' | 'MENTIONS';
|
||||||
|
|
||||||
interface GuildEmojiEditData {
|
|
||||||
name?: string;
|
|
||||||
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface EmbedField {
|
interface EmbedField {
|
||||||
name: string;
|
name: string;
|
||||||
value: string;
|
value: string;
|
||||||
@@ -2154,6 +2160,25 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
||||||
|
|
||||||
|
interface ErrorEvent {
|
||||||
|
error: any;
|
||||||
|
message: string;
|
||||||
|
type: string;
|
||||||
|
target: WebSocket;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface EscapeMarkdownOptions {
|
||||||
|
codeBlock?: boolean;
|
||||||
|
inlineCode?: boolean;
|
||||||
|
bold?: boolean;
|
||||||
|
italic?: boolean;
|
||||||
|
underline?: boolean;
|
||||||
|
strikethrough?: boolean;
|
||||||
|
spoiler?: boolean;
|
||||||
|
inlineCodeContent?: boolean;
|
||||||
|
codeBlockContent?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
interface Extendable {
|
interface Extendable {
|
||||||
GuildEmoji: typeof GuildEmoji;
|
GuildEmoji: typeof GuildEmoji;
|
||||||
DMChannel: typeof DMChannel;
|
DMChannel: typeof DMChannel;
|
||||||
@@ -2187,17 +2212,6 @@ declare module 'discord.js' {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MessageActivity {
|
|
||||||
partyID: string;
|
|
||||||
type: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MessageReference {
|
|
||||||
channelID: string;
|
|
||||||
guildID: string;
|
|
||||||
messageID: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
type GuildAuditLogsAction = keyof GuildAuditLogsActions;
|
type GuildAuditLogsAction = keyof GuildAuditLogsActions;
|
||||||
|
|
||||||
interface GuildAuditLogsActions {
|
interface GuildAuditLogsActions {
|
||||||
@@ -2286,11 +2300,6 @@ declare module 'discord.js' {
|
|||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface GuildEmojiCreateOptions {
|
|
||||||
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
|
||||||
reason?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface GuildEditData {
|
interface GuildEditData {
|
||||||
name?: string;
|
name?: string;
|
||||||
region?: string;
|
region?: string;
|
||||||
@@ -2312,6 +2321,16 @@ declare module 'discord.js' {
|
|||||||
channel: GuildChannelResolvable | null;
|
channel: GuildChannelResolvable | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface GuildEmojiCreateOptions {
|
||||||
|
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
||||||
|
reason?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface GuildEmojiEditData {
|
||||||
|
name?: string;
|
||||||
|
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
||||||
|
}
|
||||||
|
|
||||||
type GuildFeatures = 'ANIMATED_ICON'
|
type GuildFeatures = 'ANIMATED_ICON'
|
||||||
| 'BANNER'
|
| 'BANNER'
|
||||||
| 'COMMERCE'
|
| 'COMMERCE'
|
||||||
@@ -2366,6 +2385,11 @@ declare module 'discord.js' {
|
|||||||
| 1024
|
| 1024
|
||||||
| 2048;
|
| 2048;
|
||||||
|
|
||||||
|
interface ImageURLOptions {
|
||||||
|
format?: ImageExt;
|
||||||
|
size?: ImageSize;
|
||||||
|
}
|
||||||
|
|
||||||
interface IntegrationData {
|
interface IntegrationData {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
@@ -2394,13 +2418,18 @@ declare module 'discord.js' {
|
|||||||
type MembershipStates = 'INVITED'
|
type MembershipStates = 'INVITED'
|
||||||
| 'ACCEPTED';
|
| 'ACCEPTED';
|
||||||
|
|
||||||
|
type MessageAdditions = MessageEmbed | MessageAttachment | (MessageEmbed | MessageAttachment)[];
|
||||||
|
|
||||||
|
interface MessageActivity {
|
||||||
|
partyID: string;
|
||||||
|
type: number;
|
||||||
|
}
|
||||||
|
|
||||||
interface MessageCollectorOptions extends CollectorOptions {
|
interface MessageCollectorOptions extends CollectorOptions {
|
||||||
max?: number;
|
max?: number;
|
||||||
maxProcessed?: number;
|
maxProcessed?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
type MessageAdditions = MessageEmbed | MessageAttachment | (MessageEmbed | MessageAttachment)[];
|
|
||||||
|
|
||||||
interface MessageEditOptions {
|
interface MessageEditOptions {
|
||||||
content?: string;
|
content?: string;
|
||||||
embed?: MessageEmbedOptions | null;
|
embed?: MessageEmbedOptions | null;
|
||||||
@@ -2408,6 +2437,26 @@ declare module 'discord.js' {
|
|||||||
flags?: BitFieldResolvable<MessageFlagsString>;
|
flags?: BitFieldResolvable<MessageFlagsString>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface MessageEmbedAuthor {
|
||||||
|
name?: string;
|
||||||
|
url?: string;
|
||||||
|
iconURL?: string;
|
||||||
|
proxyIconURL?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MessageEmbedFooter {
|
||||||
|
text?: string;
|
||||||
|
iconURL?: string;
|
||||||
|
proxyIconURL?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MessageEmbedImage {
|
||||||
|
url: string;
|
||||||
|
proxyURL?: string;
|
||||||
|
height?: number;
|
||||||
|
width?: number;
|
||||||
|
}
|
||||||
|
|
||||||
interface MessageEmbedOptions {
|
interface MessageEmbedOptions {
|
||||||
title?: string;
|
title?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
@@ -2423,11 +2472,9 @@ declare module 'discord.js' {
|
|||||||
footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string; };
|
footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string; };
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MessageEmbedAuthor {
|
interface MessageEmbedProvider {
|
||||||
name?: string;
|
name: string;
|
||||||
url?: string;
|
url: string;
|
||||||
iconURL?: string;
|
|
||||||
proxyIconURL?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MessageEmbedThumbnail {
|
interface MessageEmbedThumbnail {
|
||||||
@@ -2437,24 +2484,6 @@ declare module 'discord.js' {
|
|||||||
width?: number;
|
width?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MessageEmbedFooter {
|
|
||||||
text?: string;
|
|
||||||
iconURL?: string;
|
|
||||||
proxyIconURL?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MessageEmbedImage {
|
|
||||||
url: string;
|
|
||||||
proxyURL?: string;
|
|
||||||
height?: number;
|
|
||||||
width?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MessageEmbedProvider {
|
|
||||||
name: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MessageEmbedVideo {
|
interface MessageEmbedVideo {
|
||||||
url?: string;
|
url?: string;
|
||||||
proxyURL?: string;
|
proxyURL?: string;
|
||||||
@@ -2462,6 +2491,18 @@ declare module 'discord.js' {
|
|||||||
width?: number;
|
width?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface MessageEvent {
|
||||||
|
data: WebSocket.Data;
|
||||||
|
type: string;
|
||||||
|
target: WebSocket;
|
||||||
|
}
|
||||||
|
|
||||||
|
type MessageFlagsString = 'CROSSPOSTED'
|
||||||
|
| 'IS_CROSSPOST'
|
||||||
|
| 'SUPPRESS_EMBEDS'
|
||||||
|
| 'SOURCE_MESSAGE_DELETED'
|
||||||
|
| 'URGENT';
|
||||||
|
|
||||||
interface MessageOptions {
|
interface MessageOptions {
|
||||||
tts?: boolean;
|
tts?: boolean;
|
||||||
nonce?: string;
|
nonce?: string;
|
||||||
@@ -2476,6 +2517,12 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
type MessageReactionResolvable = MessageReaction | Snowflake;
|
type MessageReactionResolvable = MessageReaction | Snowflake;
|
||||||
|
|
||||||
|
interface MessageReference {
|
||||||
|
channelID: string;
|
||||||
|
guildID: string;
|
||||||
|
messageID: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
type MessageResolvable = Message | Snowflake;
|
type MessageResolvable = Message | Snowflake;
|
||||||
|
|
||||||
type MessageTarget = TextChannel | DMChannel | User | GuildMember | Webhook | WebhookClient;
|
type MessageTarget = TextChannel | DMChannel | User | GuildMember | Webhook | WebhookClient;
|
||||||
@@ -2513,6 +2560,8 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
interface PermissionOverwriteOption extends Partial<Record<PermissionString, boolean | null>> { }
|
interface PermissionOverwriteOption extends Partial<Record<PermissionString, boolean | null>> { }
|
||||||
|
|
||||||
|
type PermissionResolvable = BitFieldResolvable<PermissionString>;
|
||||||
|
|
||||||
type PermissionString = 'CREATE_INSTANT_INVITE'
|
type PermissionString = 'CREATE_INSTANT_INVITE'
|
||||||
| 'KICK_MEMBERS'
|
| 'KICK_MEMBERS'
|
||||||
| 'BAN_MEMBERS'
|
| 'BAN_MEMBERS'
|
||||||
@@ -2546,8 +2595,6 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
interface RecursiveArray<T> extends Array<T | RecursiveArray<T>> { }
|
interface RecursiveArray<T> extends Array<T | RecursiveArray<T>> { }
|
||||||
|
|
||||||
type PermissionResolvable = BitFieldResolvable<PermissionString>;
|
|
||||||
|
|
||||||
interface PermissionOverwriteOptions {
|
interface PermissionOverwriteOptions {
|
||||||
allow: PermissionResolvable;
|
allow: PermissionResolvable;
|
||||||
deny: PermissionResolvable;
|
deny: PermissionResolvable;
|
||||||
@@ -2569,20 +2616,6 @@ declare module 'discord.js' {
|
|||||||
|
|
||||||
type PresenceResolvable = Presence | UserResolvable | Snowflake;
|
type PresenceResolvable = Presence | UserResolvable | Snowflake;
|
||||||
|
|
||||||
type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
|
||||||
|
|
||||||
interface ClientPresenceStatusData {
|
|
||||||
web?: ClientPresenceStatus;
|
|
||||||
mobile?: ClientPresenceStatus;
|
|
||||||
desktop?: ClientPresenceStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
type PartialTypes = 'USER'
|
|
||||||
| 'CHANNEL'
|
|
||||||
| 'GUILD_MEMBER'
|
|
||||||
| 'MESSAGE'
|
|
||||||
| 'REACTION';
|
|
||||||
|
|
||||||
type Partialize<T> = {
|
type Partialize<T> = {
|
||||||
id: string;
|
id: string;
|
||||||
partial: true;
|
partial: true;
|
||||||
@@ -2591,11 +2624,17 @@ declare module 'discord.js' {
|
|||||||
[K in keyof Omit<T, 'id' | 'partial'>]: T[K] | null;
|
[K in keyof Omit<T, 'id' | 'partial'>]: T[K] | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface PartialMessage extends Partialize<Message> {}
|
|
||||||
interface PartialChannel extends Partialize<Channel> {}
|
interface PartialChannel extends Partialize<Channel> {}
|
||||||
interface PartialGuildMember extends Partialize<GuildMember> {}
|
interface PartialGuildMember extends Partialize<GuildMember> {}
|
||||||
|
interface PartialMessage extends Partialize<Message> {}
|
||||||
interface PartialUser extends Partialize<User> {}
|
interface PartialUser extends Partialize<User> {}
|
||||||
|
|
||||||
|
type PartialTypes = 'USER'
|
||||||
|
| 'CHANNEL'
|
||||||
|
| 'GUILD_MEMBER'
|
||||||
|
| 'MESSAGE'
|
||||||
|
| 'REACTION';
|
||||||
|
|
||||||
type PresenceStatus = ClientPresenceStatus | 'offline';
|
type PresenceStatus = ClientPresenceStatus | 'offline';
|
||||||
|
|
||||||
type PresenceStatusData = ClientPresenceStatus | 'invisible';
|
type PresenceStatusData = ClientPresenceStatus | 'invisible';
|
||||||
@@ -2746,44 +2785,5 @@ declare module 'discord.js' {
|
|||||||
| 'VOICE_SERVER_UPDATE'
|
| 'VOICE_SERVER_UPDATE'
|
||||||
| 'WEBHOOKS_UPDATE';
|
| 'WEBHOOKS_UPDATE';
|
||||||
|
|
||||||
interface MessageEvent {
|
|
||||||
data: WebSocket.Data;
|
|
||||||
type: string;
|
|
||||||
target: WebSocket;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CloseEvent {
|
|
||||||
wasClean: boolean;
|
|
||||||
code: number;
|
|
||||||
reason: string;
|
|
||||||
target: WebSocket;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ErrorEvent {
|
|
||||||
error: any;
|
|
||||||
message: string;
|
|
||||||
type: string;
|
|
||||||
target: WebSocket;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CrosspostedChannel {
|
|
||||||
channelID: Snowflake;
|
|
||||||
guildID: Snowflake;
|
|
||||||
type: keyof typeof ChannelType;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface EscapeMarkdownOptions {
|
|
||||||
codeBlock?: boolean;
|
|
||||||
inlineCode?: boolean;
|
|
||||||
bold?: boolean;
|
|
||||||
italic?: boolean;
|
|
||||||
underline?: boolean;
|
|
||||||
strikethrough?: boolean;
|
|
||||||
spoiler?: boolean;
|
|
||||||
inlineCodeContent?: boolean;
|
|
||||||
codeBlockContent?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user