So I've been trying to do something so if someone dm's you, it'll reply with a message.
Example:
Friend: Hey
Bot: I'm afk
Something like that so basically when someone sends a message to your dms the bot will reply a message saying something.
So I've been trying to do something so if someone dm's you, it'll reply with a message.
Example:
Friend: Hey
Bot: I'm afk
Something like that so basically when someone sends a message to your dms the bot will reply a message saying something.
Share Improve this question edited Dec 5, 2018 at 14:59 Federico Grandi 6,7865 gold badges33 silver badges51 bronze badges asked Dec 5, 2018 at 1:02 Jackson4765Jackson4765 111 silver badge2 bronze badges 1- 2 Wele to Stack Overflow ! What exactly is your question ? We can't seem to find it in your post – GMB Commented Dec 5, 2018 at 1:28
2 Answers
Reset to default 4Without 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./hc/en-us/articles/115002192352-Automated-user-accounts-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.
Use client.on
and provide a callback function as such:
client.on('message', message => {
if (message.content.startsWith('Hey'))
target.send('im afk')
})
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744785192a4593580.html
评论列表(0条)