-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBotTemplate.js
More file actions
21 lines (14 loc) · 826 Bytes
/
BotTemplate.js
File metadata and controls
21 lines (14 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const discord = require('discord.js');
const client = new Discord.Client();
const prefix = "."//this is were you put your prefix so for ex. this would be - so i could do -command and it out put what command is
client.once('ready', () => {
console.log('<botname> is loaded'); //this is your loadup message
});
client.on('message', message => {
if(!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowercase();
if(command === 'links') { //ONLY DO THIS IF YOU WANT A SMALL AMOUNT OF COMMADS VERY VERY BAD WAY!!
message.channel.send('links here');
}
client.login('x'); //this is were you put your discords bot token! If you do not know how to do this I will put a tutorial in the readme.md!