-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdiscord.d.ts
38 lines (32 loc) · 1.12 KB
/
discord.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Message } from "discord.js";
declare module "discord.js" {
export interface Client {
commands: Collection<unknown, Command>,
cooldowns: Collection<unknown, unknown>
}
export interface Command {
name: string,
description: string,
aliases: string[],
args: boolean,
usage: string,
guildOnly: boolean,
category: string,
visible: boolean,
cooldown: number,
permissions: any,
execute: (message: Message, args: string[]) => any // Can be `Promise<SomeType>` if using async
}
export interface Message {
channel: TextChannel | DMChannel | NewsChannel
}
export interface GuildChannel {
permissionsFor: (memberOrRole: string | Message | GuildMember | User | Role) => Readonly<Permissions>
}
export interface DMChannel {
permissionsFor: (memberOrRole: string | Message | GuildMember | User | Role) => Readonly<Permissions>
}
export interface NewsChannel {
permissionsFor: (memberOrRole: string | Message | GuildMember | User | Role) => Readonly<Permissions>
}
}