-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
83 lines (74 loc) · 2.46 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
declare module 'sparkbots' {
import { ClientOptions, Snowflake, MessageEmbed, Client as DiscordClient, Message, ClientEvents, CommandInteraction } from 'discord.js'
import DataStore from 'sparkbots/src/dataStore'
import CustomConfig from 'sparkbots/src/CustomConfig'
// @ts-expect-error
interface Client extends DiscordClient {
readonly api: {
applications: any
channels: any
gateway: any
guilds: any
invites: any
oauth2: any
users: any
voice: any
webhooks: any
}
config: any
}
const version : string
const DataStore: DataStore
const methods: {RichEmbed: MessageEmbed, MessageEmbed: MessageEmbed}
const CustomConfig: CustomConfig
function command(name: string): Command
interface Command {
addAlias(name: string | string[]): void
setDescription(description: string): void
setLevel(level: number): void
allowDms(allow: boolean): void
addHelpField(title: string, value: string, inline: boolean): void
disable(): void
level: number
name: string
code(client: Client, interaction: CommandInteraction | Message): any
}
function observer(name: string): Observer
interface Observer {
setType(type: 'command' | 'message' | 'all'): void
disable(): void
code(client: Client, message: Message): any
}
function engine(name: string): Engine
interface Engine {
setTime(time: number): void
setDelay(delay: number): void
disable(): void
code(client: Client): any
}
function permission(name: string, {level: number}): Permission
interface Permission {
setLevel(level: number): void
disable(): void
level: number
code(client: Client, interaction: CommandInteraction, message: Message): boolean
}
const snippet: any
function event(name: string): Event
interface Event {
setEvent(event: keyof ClientEvents): void
code(client: Client, ...args: any): any
}
function start(options: StartOptions): any
interface StartOptions {
prefix: string | string[]
ignoreBots?: boolean
token?: string
disabled?: any
clientOptions?: ClientOptions
ownerID?: Snowflake
embedColor?: string
ignoreUpdate?: boolean | string | string[]
first?: boolean
}
}