Answer the question
In order to leave comments, you need to log in
Problem with code, can you help?
The other day I found a code in an English video course and there was this code:
const Discord = require("discord.js")
module.exports.run = async (bot, message, args) => {
if(!message.member.hasPermission(["MANAGE_MESSAGES", "ADMINISTRATOR"])) return message.channel.send("You can not use this command!")
let argsresult;
let mChannel = message.mentions.channels.first()
message.delete()
if(mChannel) {
argsresult = args.slice(1).join(" ")
mChannel.send(argsresult)
} else {
argsresult = args.join(" ")
message.channel.send(argsresult)
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question