Reputation: 1
So, I'm coding a discord bot using discord.js and I'm making a "say" command. I watched a few tutorials which didn't work, asked a few friends, and I've got nothing. This is the file's code:
const Discord = require('discord.js');
module.exports = {
name: 'say',
description: "Says message",
async run (client, message, args) {
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send('๐You dont have the permissions to do this command!๐')
if(!message.guild.me.hasPermission("MANAGE_MESSAGES")) return message.channel.send('๐Sorry, it seems I dont have the permissions to do that command.๐')
if(!args[0]) return message.reply('please tell me what to say.');
message.channel.send(`${args.join(" ")}`);
}
}
Does anyone know how I could make this actually work? thanks!
Upvotes: 0
Views: 76
Reputation: 16
I'm not sure, but might be cuz of you didn't include arguments into your module.
module.exports = {
name: 'say',
description: "Says message",
args: true,
args: true
Upvotes: -1