-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtalkToGabe.js
70 lines (36 loc) · 1.31 KB
/
talkToGabe.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
const Discord = require('discord.js');
const { prefix, talkToToken } = require('./config.json');
const client = new Discord.Client();
const chalk = require("chalk");
const log = console.log;
log(chalk.keyword("orange")("Hello!"));
//Modules
const color = require("./modules/color.js");
const errorMessage = require("./modules/errorMessage.js");
const status = require("./modules/status.js");
const talkToGPT = require("./modules/talkToGPT.js");
client.once('ready', () => {
color.g("Talk nerdy to me.");
status.set(client);
});
const color1 = "#39FF14";
const color2 = "000000"
client.on('message', message => {
const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
//actions
if (message.author.bot) return;
//message.channel.createWebhook(message.author.username, {avatar: message.author.avatarURL()}).then(webhook => {
/*message.channel.createWebhook(message.author.username, {avatar: message.author.avatarURL()}).then(webhook => {
webhook.send(message.content).then(() => {
webhook.delete();
}).catch();
}).catch();*/
//commands:
if (talkToGPT.content(client, message, command, args)) {
return;
}
//prefixed commands only
if (!message.content.startsWith(prefix) || message.author.bot) return;
});
client.login(talkToToken);