Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ bot.on('guildDelete', (guild) => { // If the Bot was removed on a server, procee

bot.on('message', (message) => {
if (message.channel.type === "dm" || message.author.bot || message.author === bot.user) return; // Checks if we're on DMs, or the Author is a Bot, or the Author is our Bot, stop.
var args = message.content.split(' ').slice(1); // We need this later
var command = message.content.split(' ')[0].replace(guildConf[message.guild.id].prefix, ''); // Replaces the Current Prefix with this
var args = message.content.slice(guildConf[message.guild.id].prefix.length).split(/ +/g); // We need this later
var command = args.shift().toLowerCase(); // Replaces the Current Prefix with this

if (command === "ping") { // If your command is <prefix>ping, proceed
message.channel.send('pong!') // Reply pong!
Expand Down