Pizza123
Pizza123

Reputation: 1

having trouble sending discord "say" command message argument

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

Answers (1)

Almas Sharipkhan
Almas Sharipkhan

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

Related Questions