-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
52 lines (46 loc) · 1019 Bytes
/
index.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
import {
CommandClient,
GatewayIntents,
CommandClientOptions,
event,
SlashBuilder,
} from "harmony";
import "https://deno.land/x/[email protected]/load.ts";
class Bot extends CommandClient {
constructor(options: CommandClientOptions) {
super(options);
SlashBuilder;
}
@event()
public async ready() {
console.log(`Online in ${await this.guilds.size()} servers`);
}
}
const bot = new Bot({
prefix: [],
owners: ["314166178144583682"],
presence: {
status: "online",
activity: {
name: "UNO on discord! | /help",
type: "PLAYING",
},
},
mentionPrefix: true,
allowDMs: false,
spacesAfterPrefix: true,
shardCount: "auto",
caseSensitive: false,
});
for await (const command of Deno.readDir("./modules")) {
if (command.isFile) {
const cmd = (await import(`./modules/${command.name}`)).default;
bot.extensions.load(cmd);
}
}
bot.connect(Deno.env.get("TOKEN"), [
GatewayIntents.GUILDS,
GatewayIntents.GUILD_MESSAGES,
GatewayIntents.GUILD_PRESENCES,
GatewayIntents.GUILD_MEMBERS,
]);