-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bot.ts
39 lines (37 loc) · 943 Bytes
/
Bot.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
import {
Discord,
Once,
Client,
ArgsOf,
CommandNotFound,
CommandMessage,
} from "@typeit/discord";
import { MessageEmbed } from "discord.js";
import * as Path from "path";
@Discord("!", {
import: [
Path.join(__dirname, "commands", "*.ts"),
Path.join(__dirname, "functions", "*.ts"),
Path.join(__dirname, "functions/auth", "*.ts")
],
})
export class Bot {
@Once("ready")
onReady(event: ArgsOf<"ready">, client: Client): void {
console.info("Welcome to TDU21-Discord Bot...");
client.user.setPresence({
activity: {
name: "キャンパス建築中...",
},
});
}
@CommandNotFound()
onCommandNotFound(message: CommandMessage): void {
message.channel.send({embed:
new MessageEmbed()
.setColor("#F24024")
.setTitle("コマンドが見つかりませんでした")
.setDescription("入力内容を確認してください")}
);
}
}