所以我一直在尝试做一些事情,所以如果有人 dm 是你,它会回复一条消息.
So I've been trying to do something so if someone dm's you, it'll reply with a message.
例子:
Friend: Hey
Bot: I'm afk
类似的事情,所以基本上当有人向您的 dms 发送消息时,机器人会回复一条消息说什么.
Something like that so basically when someone sends a message to your dms the bot will reply a message saying something.
如果不破坏 Discord TOS,你不能.因为你需要一个 userbot 或 selfbot.基本上它的一些机器人充当用户(在你的情况下阅读消息).而且大多数图书馆都放弃了对 selfbots 的支持.
供参考:https://support.discordapp.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-
Without breaking Discord TOS you can't. Because you would need to have a userbot or selfbot. Basically its some bot that acts as the user (in your case reading the messages). And most libraries are dropping the support for selfbots.
For reference: https://support.discordapp.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-
禁止在 OAuth2/bot API 之外自动化普通用户帐户(通常称为self-bots"),如果发现,可能会导致帐户终止.
Automating normal user accounts (generally called "self-bots") outside of the OAuth2/bot API is forbidden, and can result in an account termination if found.
这篇关于自动回复直接消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
discord.js v12:我如何等待 DM 频道中的消息?discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 频道中的消息?)
如何让我的机器人提及发出该机器人命令的人how to make my bot mention the person who gave that bot command(如何让我的机器人提及发出该机器人命令的人)
如何修复必须使用导入来加载 ES 模块 discord.jsHow to fix Must use import to load ES Module discord.js(如何修复必须使用导入来加载 ES 模块 discord.js)
如何列出来自特定服务器的所有成员?How to list all members from a specific server?(如何列出来自特定服务器的所有成员?)
Discord bot:修复“找不到 FFMPEG"Discord bot: Fix ‘FFMPEG not found’(Discord bot:修复“找不到 FFMPEG)
使用 discord.js 加入 discord 服务器时的欢迎消息Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服务器时的欢迎消息)