Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

discord.py setup_hook

class MyBot(commands.Bot):
    async def setup_hook(self):
        self.loop.create_task(background_task())

bot = MyBot()
bot.run('token')
# Changes to async initialisation in discord.py
# https://gist.github.com/Rapptz/6706e1c8f23ac27c98cee4dd985c8120
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+9 =