-
Notifications
You must be signed in to change notification settings - Fork 4
/
linkie.d.ts
87 lines (77 loc) · 2.18 KB
/
linkie.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
84
85
86
87
declare namespace Linkie {
interface Message {
delete(): void;
author: User | Member;
content: string;
edit(content: string): void;
editAsEmbed(content: string): void;
editAsEmbed(title: string, content: string): void;
mentionsEveryone: boolean;
isPinned: boolean;
isTts: boolean;
channelId: string;
guildId: string | null;
}
interface Channel {
sendEmbed(content: string | ((spec: EmbedSpec) => void)): void;
sendEmbed(title: string, content: string): void;
sendMessage(content: string): void;
id: string;
mention: string;
}
interface EmbedSpec {
title: string;
description: string;
url: string;
color: string;
image: string;
thumbnail: string;
}
interface User {
username: string;
discriminator: string;
discriminatedName: string;
mention: string;
id: string;
isBot: boolean;
avatarUrl: string;
animatedAvatar: boolean;
}
interface Member extends User {
nickname: string;
displayName: string;
}
interface Engine {
prefix: string;
cmd: string;
flags: string[];
runGlobalTrick(script: string): void;
runGlobalTrick(script: string, args: string[]): void;
escapeUrl(url: string): string;
}
interface System {
currentTimeMillis(): number;
nanoTime(): number;
}
interface Namespaces {
namespaces: Namespace[]
}
interface Namespace {
id: string;
reloading: boolean;
defaultVersion: string;
versions: string[];
supportsAT: boolean;
supportsAW: boolean;
supportsMixin: boolean;
supportsFieldDescription: boolean;
}
}
declare let args: string[];
declare let message: Linkie.Message;
declare let channel: Linkie.Channel;
declare let engine: Linkie.Engine;
declare let system: Linkie.System;
declare let namespaces: Linkie.Namespaces;
declare function validateArgsEmpty(): void;
declare function validateArgsNotEmpty(usage: string): void;