I wanted to make my bot say whatever I tell it to by using a command. I have the code copied from other parts of my bot and it is working there yet here it just doesn't and I can't understand why. There are no error messages. Here's my code:
const { Permissions } = require('discord.js');
module.exports = {
name: 'say',
description: "Sprawia że coś mówię.",
execute(message, args)
{
let text = args.join(" ").slice(22);
if(text)
{
message.channel.send(text)
}
else
{
message.reply('test')//show correct usage
}
}
}
(const {Permissions} will be used later so don't worry about it being there) Also you can see what it looks like on discord: here.