javascript - 如何为服务器通道 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]}** `)
}
}
解决方案
推荐阅读
- c++ - 测量操作块的时间
- python - 从前端插入记录时如何将当前用户自动插入我的数据库
- go - 在 Mainflux 中接收来自 Nats 的消息
- vaadin - 如何在 Vaadin Fusion 中将 URL 参数与路由器一起使用?
- jestjs - 在@apollo/client 中测试 OnSubscriptionData 功能
- python - python reuters tex 分类 MDC 和 Naive 坏预测
- typo3 - 错字3包括来自错误路径的文件
- javascript - 我如何检查某个机器人是否存在于公会中?不和谐.js
- python - Pandas Dataframe 根据多列 id 和时间戳用 sequence_id 填充列
- docker - 命令在 docker 容器内工作,但 docker exec 失败