📜  discord.js 清除控制台 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:27.340000             🧑  作者: Mango

代码示例1
// DONT DISLIKE IF YOU CANT UNDERSTAND // 
client.on('message', message => {
    if (message.author.bot) return;
    if (message.content.toLowerCase().startsWith(prefix + 'clear console')) {
        if (message.author.id === 'ADMIN-ID-HERE' || message.author.id === 'ANOTHER-ADMIN-ID-HERE' ) {
            console.clear()
            message.channel.send("**Console Cleared**")
        } else {
            message.channel.send("This Command is Resticted To Bot Owners")
        }

    }
})