Skip to content

Commit b8998f3

Browse files
committed
feat!: Update the bot to Discord V13
BREAKING CHANGE: Now the bot had an update to Discord V13, enjoy it and report any bugs
1 parent 86bc3dd commit b8998f3

File tree

267 files changed

+8175
-27554
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+8175
-27554
lines changed

app.js

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,44 @@
1-
const config = require("./config.json");
2-
const Client = require("./src/client.js");
3-
const {Intents} = require("discord.js");
4-
const {index} = require("./src/utils/dashboard.js");
5-
const botlist = config.botlist;
6-
global.__basedir = __dirname;
7-
/*
8-
const Discord = require('discord.js');
9-
const klient = new Discord.Client();
10-
const slash = require('discord-slash-commands-v12');
11-
slash(klient);
12-
*/
13-
// Client setup
14-
const intents = new Intents();
15-
intents.add(
16-
"GUILD_PRESENCES",
17-
"GUILD_MEMBERS",
18-
"GUILDS",
19-
"GUILD_VOICE_STATES",
20-
"GUILD_MESSAGES",
21-
"GUILD_MESSAGE_REACTIONS"
22-
);
23-
const client = new Client(config, {ws: {intents}});
24-
// Initialize client
25-
function init() {
26-
client.loadEvents("./src/events");
27-
client.loadCommands("./src/commands");
28-
client.loadTopics("./data/trivia");
29-
client.login(client.token);
30-
}
31-
32-
init();
33-
34-
if (botlist) {
35-
let {botlist} = require("./src/utils/botlist.js")
36-
botlist(client).then(() => {
37-
client.logger.info("Botlist updated!");
38-
}
39-
);
40-
}
41-
42-
43-
if(!(client.shard)) {
44-
const { index } = require("./src/utils/dashboard.js");
45-
index(client);
46-
}
47-
48-
49-
process.on("unhandledRejection", (err) => client.logger.error(err));
1+
require("dotenv").config();
2+
const Client = require("./src/client.js");
3+
const config = require("./config.json");
4+
const { Player } = require('discord-player');
5+
const {index} = require("./src/utils/dashboard.js");
6+
const botlist = config.botlist;
7+
global.__basedir = __dirname;
8+
9+
const client = new Client(config, {
10+
intents: 8191,
11+
allowedMentions: { parse: ['users', 'roles'], repliedUser: true }
12+
});
13+
14+
client.player = new Player(client);
15+
const player = client.player;
16+
17+
// Initialize client
18+
function init() {
19+
client.loadCommands("./src/commands");
20+
client.loadSlashCommands("./src/slash")
21+
client.loadEvents("./src/events", client, player);
22+
client.loadMusicEvents("./src/music", player);
23+
client.loadTopics("./data/trivia");
24+
client.login(client.token);
25+
}
26+
27+
init();
28+
29+
if (botlist) {
30+
let {botlist} = require("./src/utils/botlist.js")
31+
botlist(client).then(() => {
32+
client.logger.info("Botlist updated!");
33+
}
34+
);
35+
}
36+
37+
38+
if(!(client.shard)) {
39+
const { index } = require("./src/utils/dashboard.js");
40+
index(client);
41+
}
42+
43+
44+
process.on("unhandledRejection", (err) => client.logger.error(err));

data/fake_data.json

Lines changed: 0 additions & 1000 deletions
This file was deleted.

0 commit comments

Comments
 (0)