This repository was archived by the owner on Jun 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.js
More file actions
38 lines (29 loc) · 1.69 KB
/
bot.js
File metadata and controls
38 lines (29 loc) · 1.69 KB
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
//
// bot.js
// UserBot
//
// Created by TotallyNotNero on 12/22/18.
// Copyright © 2018 - 2019 TotallyNotNero. All rights reserved.
//
const Discord = require("discord.js");
const bot = new Discord.Client();
const config = require("./Configuration/config.json");
bot.login(config.token);
require("./util/eventLoader.js")(bot);
bot.on("ready", function() {
console.log(`[info] Started the best Discord bot! Running...`)
console.log(`[info] Connected to Discord as: ${bot.user.tag} with the id: ${bot.user.id}! Prefix: ${config.prefix}, branch: ${config.branch}, version: ${config.version}`)
require('child_process').exec('cd dashboard && node WebServer.js', () => {
})
})
bot.on("guildCreate", function(guild) {
console.log(`[guildCreate, info] I was just added to ${guild.name}`)
const embed = new Discord.RichEmbed()
.setAuthor(bot.user.username, bot.user.avatarURL)
.addField(`:wave: Welcome!`, `Thanks for adding UserBot to your server! You might be wondering, how do I setup UserBot? Well, I'll show you.`)
.addField(`Getting Started`, `To get started, make sure you create a role called "Staff". This role will enable you moderation features such as kick/ban etc. Next, you might want to give this role to other staff members who will be able to take moderation features!`)
.addField(`Anything Else?`, `If there is, you can always join the support server or DM a Developer. Developer(s) you can message include ` + "`TotallyNotNero#0420`" + `. The support server should be in the ` + "`about`" + ` command`)
.setColor(0x00ff00)
.setFooter(`Thanks for adding ${bot.user.username}, I wish you luck!`)
guild.owner.send(embed)
})