-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgir.js
89 lines (80 loc) · 4.34 KB
/
gir.js
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
88
89
'use strict'
try {
require('./config.json')
} catch (e) {
console.log('Config file not found, make one using the example config and restart the bot.');
process.exit();
}
const fs = require('node:fs');
const path = require('node:path');
const { Client, Collection, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');
const bot = new Client({ intents: [GatewayIntentBits.Guilds], autoReconnect: true });
bot.commands = new Collection();
const commandsPath = path.join(__dirname, 'modules')
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
bot.commands.set(command.data?.name, command);
}
bot.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;
const command = bot.commands.get(interaction.commandName);
if (!command) return;
try {
await command.execute(bot, interaction);
} catch (error) {
console.error(error);
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true })
}
})
bot.on('ready', () => {
const gir = `
.^^. .^^.
.:~!!^. :!!~:
^!7?7^ ^7?7~:
^777!. ~7?7.
:777^ :!?~
!?!. .!7.
^?~ !~
.7^ ..:^~!!7?JJJYYYYYYYYJJ??7!~^^:. .!.
~^ .:~7?Y5PGBBB#########GG##########BBBBGP5J?!^:. .^
.: :~?YPGBB###BBBBBBBBBBBBBB#7:BBBBBBBBBBBBBBBBB##BGP5Y?!:.
:!JPBB##BBBBBBBBBBBBBBBBBBBBB#J~BBBBBBBBBBBBBBBBBBBBBGPGGGPY:
5##BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBGPPPPG7
.GBBBB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5!BBBBBBB5?7P##&@@@@@@@@@@@@@@@@#!
^Y#@@@@@@@@@&&&#BGY?JGBBBBBBGPPPPPPPBBBBGP5??5G##&&@@@@@@@@@&G7.
^7YPPGGGGP5YJJJ5GBBBBBBBBJ!?^. .5BBBBGGGPY?JY5PPGGGGP5J!:
!JYJJJY5PGBBBBBBBBBBBBBPP?^555GBBBBBBGGBBGP5JJ???JJ?:
^?PB###BBBBBBBBBBBBBBBGGPJGGGGGGGGBBBBBBBBGGGGPY?~.
^75GB##BBBBBP555Y!!??7^?J~?5PPPGBBBBBGGP5?~:
.~?YPBB##BBBBB^J5YY7Y5?!GB###BBG5Y?~:
.:~7JYPGBG^?JYYYYJ?^5GP5J7~:.
.::.!J7!77J~.:.
?G5?B#JP5. Can I be a mongoose dog?
:PP5Y55Y5B? Serving ${bot.users.cache.size} users in ${bot.channels.cache.size} channels on ${bot.guilds.cache.size} server(s)
:^~!7?JY5?
.:
`
console.log(gir);
process.title = "gir"
})
bot.on('error', console.error)
bot.on('warn', console.warn)
bot.login(token)