Reputation: 45
I'm trying to create a macro that sends a message to different channels in different servers every 8h but I can't figure out how to make it send a msg in a channel automatic (I'm trying to send the msg as soon as I run the py file) I have been searching for different example in the discord.py documentation but all the examples I found send a msg after a command) but I just want to know how do I make a discord selfbot send a message that has multiple lines to a channel and then I believe I can make it myself.
Upvotes: 0
Views: 1930
Reputation: 105
Put this in your code
import time
@client.event
async def on_message(message):
await message.channel.send('Text Here')
time.sleep(28800)
and selfbots are against the tos and you can get your account deleted
Upvotes: 1
Reputation: 137
I know this should just be a comment but for the sake of making sure people will see this, I'm also posting it as an answer.:
Self-bots are 100% against the Terms of Service of the Discord API, you can have your account deleted for using one. https://support.discord.com/hc/en-us/articles/115002192352-Automated-user-accounts-self-bots-
Upvotes: 2