Fix botlist task
This commit is contained in:
parent
2e28cab8e2
commit
65268fc7b4
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Search Functionality
|
||||
# Provides search results from SearX
|
||||
# Better Logging
|
||||
# Adds some better logging with utils.logging.
|
||||
|
||||
'''Search Cog'''
|
||||
'''Better Logging Cog'''
|
||||
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
|
|
|
@ -28,10 +28,13 @@ class BotList(commands.Cog, name='Bot List'):
|
|||
self.bod_token = bot.config['BOD']
|
||||
self.dblcom_token = bot.config['DBLCOM']
|
||||
|
||||
# top.gg clent
|
||||
# top.gg client
|
||||
self.dbl_client = dbl.DBLClient(
|
||||
self.bot, self.dbl_token)
|
||||
|
||||
# Start update loop
|
||||
self.update_stats.start()
|
||||
|
||||
async def _update_logic(self):
|
||||
"""Handles all statistic updating for various different bot lists."""
|
||||
|
||||
|
@ -140,6 +143,9 @@ class BotList(commands.Cog, name='Bot List'):
|
|||
responses = await self._update_logic()
|
||||
print(responses) # TODO See other todo
|
||||
|
||||
def cog_unload(self):
|
||||
self.update_stats.cancel()
|
||||
|
||||
|
||||
def setup(bot):
|
||||
"""Adds the cog to the bot."""
|
||||
|
|
Loading…
Reference in New Issue