-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.js
45 lines (33 loc) · 1.41 KB
/
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
37
38
39
40
41
42
43
44
45
const Discord = require("discord.js");
const config = require("./config.json")
const blobcord = require("./handler/ClientBuilder.js");
const client = new blobcord();
const alexa = require('alexa-bot-api');
let ai = new alexa("aw2plm");
require("./handler/module.js")(client);
require("./handler/Event.js")(client);
client.package = require("./package.json");
client.on("warn", console.warn);
client.on("error", console.error);
let memberlog = "764313658376978492";
client.on("guildMemberAdd", member => {
if (member.guild.id !== "764313658376978492") return;
client.channels.cache.get(memberlog).send(`<:Left_Arrow:766876946143117323> **<@!${member.user.id}>** has joined the party.`);
})
client.on("guildMemberRemove", member => {
if (member.guild.id !== "764313658376978492") return;
client.channels.cache.get(memberlog).send(`<:Right_Arrow:772303456735068161> **${member.user.tag}** has left the party.`);
});
client.on('message', async message => {
if (message.author.bot) return;
if(message.content.startsWith(`<@${client.user.id}>`)){
return message.channel.sendI(`Hey ${message.author}, my prefix is `/``)
}
if (message.channel.id === "766310415533473842") {
let content = message.content;
ai.getReply(content).then(r => message.channel.send(r));
} else {
return;
}
});
client.login(config.token).catch(console.error);