const Discord = require('discord.js')
const client = new Discord.Client({ws: {intents: Discord.Intents.ALL}});
exports.run = async (bot,message,args) => {
let embed = new Discord.MessageEmbed()
.setTitle(`Commands`)
.setDescription(`**!Angry** - Expresses an Angry message \n **!Bye** - Tells you bye \n **!Meme** - Grabs a random DankMeme\n**!AHelp** - Admin permission command list` )
.setColor('#eeff00')
.setTimestamp()
.setFooter(`${message.guild.name}\nMaintained - BLADEZ#7296`)
message.channel.send(embed)
}
exports.help = {
name: 'Help'
}
(上下文这是我的!帮助命令^) 所以我试图让我使用的命令不区分大小写以便于使用,有人知道该怎么做吗?因为我已经尝试了一些东西,但无法让它工作!谢谢
bot.on('ready', () => { //Direct to folders
fs.readdir('./commands', (err, files, ) => {
if (err) return console.log(err);
let jsfile = files.filter(f => f.split(".").pop() == 'js');
if(jsfile.length == 0) {return console.log("Could Not Find Any Commands!")}
jsfile.forEach(f => {
let props = require (`./commands/${f}`);
bot.commands.set(props.help.name, props)
})
不确定技术术语是什么,但上面^ 是我在 index.js 中使用的“重定向”命令