首页 > 解决方案 > 如何为服务器通道 discord.js 设置 mongo.db

问题描述

如何设置 mongo .db 以记住为日志通道选择的通道?另外,如果可能的话,我想在他们选择频道时首先询问频道,然后他们可以编写报告命令。

module.exports = {
        name: 'rapor',
        description: "rapor ",
        execute(message, args,Discord) {
            if (!args[0]){
                message.reply('Who do i reporting?')
                return
            } if (!args[1]){
                message.reply('write a reason for reporting.')
                return
            } if (!args[2]){
                message.reply('What channel do i have to send report message. for first time users we showing this channel select when your log channel is saved you dont have to write your channel again')
                return
            }
            message.channel.send(`${args[0]} User is reported with:**${args[1]}** `)
        }
    }

标签: javascriptmongodbdiscord.js

解决方案


推荐阅读