Fix botlist task

This commit is contained in:
Adriene Hutchins 2020-03-05 01:02:20 -05:00
parent 2e28cab8e2
commit 65268fc7b4
3 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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."""