|
@@ -21,8 +21,8 @@ config.bangs = tuple(t for t in secrets["discord"].get("bangs", "!/"))
|
|
|
|
|
|
|
|
|
class DiscordBot(rollbot.Rollbot[discord.Message]):
|
|
|
- def __init__(self, client):
|
|
|
- super().__init__(config, database_file)
|
|
|
+ def __init__(self, client, loop):
|
|
|
+ super().__init__(config, database_file, loop=loop)
|
|
|
self.discord_client = client
|
|
|
client.event(self.on_message)
|
|
|
if secrets["discord"].get("enable_react_notifs", False):
|
|
@@ -155,7 +155,7 @@ if __name__ == "__main__":
|
|
|
intents.message_content = True
|
|
|
intents.reactions = True
|
|
|
client = discord.Client(intents=intents, loop=loop)
|
|
|
- bot = DiscordBot(client)
|
|
|
+ bot = DiscordBot(client, loop)
|
|
|
try:
|
|
|
loop.run_until_complete(bot.on_startup())
|
|
|
loop.run_until_complete(client.start(secrets["discord"]["token"]))
|