Closed ghost closed 7 years ago
This example along with this faq entry
Read this: http://discordpy.readthedocs.io/en/latest/faq.html?highlight=sleep#what-does-blocking-mean
Don't use time.sleep
, instead use asyncio.sleep
.
Now getting syntax errors import discord import asyncio client = discord.Client() await [redtext]asyncio[/redtext].sleep(30) channel.send((discord.Object(id='12324234183172'), 'Hello') client.run('token')
Please use code tags/markup.
What Python version are you running?
read what @PapyrusThePlant said
await [redtext] asyncio [/redtext].sleep(30)
Someone close this, ty!
wait i can i never realised
await client.send_message(discord.Object(id='1234567890'), 'hello')
I'm trying to make a bot that every thirty seconds it sends a piece of text to #bot-commands. How would I do this?
Code: import discord import time client = discord.Client() time.sleep(30) channel.send(ChannelIDHere,'Hello') client.run('mytokenboi') Nothing gets sent.
Note: it is a selfbot.
Thanks!