-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.js
36 lines (27 loc) · 917 Bytes
/
index.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
// Util
const { Client, Collection } = require('discord.js')
const mongoose = global.mongoose = require('mongoose');
const settings = global.settings = require('./src/settings/settings.json')
const ora = global.ora = require('ora');
//Client
const client = (global.client = new Client({ intents: [32767] }))
const tokens = global.tokenler = [];
//Functions
require('./src/functions/functions');
// Slash Commands
require('./src/util/event').load(client);
const slash = require('./src/util/slash')
// Commands
client.commands = new Collection()
//Login
client.login(settings.bot.token)
let tokenler = settings.bot.tokens;
tokenler.forEach(e => {
let token = new Client({ intents: [32767] })
token.on("ready", () => {
token.idle = false;
token.uj = 0;
tokens.push(token)
});
token.login(e).catch(err => console.error(`[HELPER] ${e.substring(Math.floor(e.length / 2))} aktif edilirken bir sorun oluştu!`));
});