first commit
This commit is contained in:
16
events/message.js
Normal file
16
events/message.js
Normal file
@ -0,0 +1,16 @@
|
||||
const Discord = require("discord.js");
|
||||
require('dotenv').config()
|
||||
const functions = require("../functions/functions.js");
|
||||
|
||||
module.exports = async (bot, message) => {
|
||||
|
||||
let prefix = process.env.PREFIX;
|
||||
|
||||
const args = message.content.split(/ +/g);
|
||||
const command = args.shift().slice(prefix.length).toLowerCase();
|
||||
const cmd = bot.commands.get(command) || bot.aliases.get(command);
|
||||
|
||||
if(!message.content.toLowerCase().startsWith(prefix) || !message.guild || message.author.bot || !cmd) return;
|
||||
|
||||
cmd.run(bot, message, args, functions)
|
||||
}
|
7
events/ready.js
Normal file
7
events/ready.js
Normal file
@ -0,0 +1,7 @@
|
||||
const Discord = require("discord.js");
|
||||
|
||||
module.exports = async (bot) => {
|
||||
|
||||
console.log(`${bot.user.username} is online!`);
|
||||
|
||||
}
|
Reference in New Issue
Block a user