-
Notifications
You must be signed in to change notification settings - Fork 0
/
turing.js
49 lines (41 loc) · 1.21 KB
/
turing.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
import {
Client,
Intents,
RichPresence,
CustomStatus,
SpotifyRPC,
MessageEmbed
} from 'discord.js-selfbot-v13';
import dotenv from 'dotenv';
import { messageCreate } from './events/messageCreate.js';
import { setPresence } from './helpers/setPresence.js';
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_PRESENCES
]
});
console.log("Re-assigning system metadata, please wait...");
dotenv.config();
const config = {
token: process.env.TOKEN,
clientID: process.env.CLIENTID,
groqSecret: process.env.GROQ_SECRET,
//
ownerID: process.env.OWNERID,
prefix: process.env.PREFIX,
//
verNum: process.env.VERNUM,
}
console.log("Successfully re-assigned system metadata.");
async function loadEvents() {
client.on('messageCreate', async message => messageCreate(client, config, message));
}
client.on('ready', async () => {
console.log(`Launching TuringAI with @${client.user.username}...`);
await setPresence(client, config);
await loadEvents();
console.log(`TuringAI ${config.verNum} is now connected to @${client.user.username}!`);
})
client.login(config.token);