As a beginner in coding, I have been working on creating a bot that can respond with whatever is said after the command !say
. For example - if you type !say hello
, the bot will reply with "hello".
This is what I have attempted:
let args = message.content.substring(PREFIX.length).split(" ");
if(message.content.startsWith(PREFIX + 'say')) {
var say = args[1].join(" ");
message.channel.send(say)
}