mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Fix botlist task
This commit is contained in:
parent
2e28cab8e2
commit
65268fc7b4
3 changed files with 10 additions and 4 deletions
Binary file not shown.
|
@ -1,9 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Search Functionality
|
# Better Logging
|
||||||
# Provides search results from SearX
|
# Adds some better logging with utils.logging.
|
||||||
|
|
||||||
'''Search Cog'''
|
'''Better Logging Cog'''
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
|
|
|
@ -28,10 +28,13 @@ class BotList(commands.Cog, name='Bot List'):
|
||||||
self.bod_token = bot.config['BOD']
|
self.bod_token = bot.config['BOD']
|
||||||
self.dblcom_token = bot.config['DBLCOM']
|
self.dblcom_token = bot.config['DBLCOM']
|
||||||
|
|
||||||
# top.gg clent
|
# top.gg client
|
||||||
self.dbl_client = dbl.DBLClient(
|
self.dbl_client = dbl.DBLClient(
|
||||||
self.bot, self.dbl_token)
|
self.bot, self.dbl_token)
|
||||||
|
|
||||||
|
# Start update loop
|
||||||
|
self.update_stats.start()
|
||||||
|
|
||||||
async def _update_logic(self):
|
async def _update_logic(self):
|
||||||
"""Handles all statistic updating for various different bot lists."""
|
"""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()
|
responses = await self._update_logic()
|
||||||
print(responses) # TODO See other todo
|
print(responses) # TODO See other todo
|
||||||
|
|
||||||
|
def cog_unload(self):
|
||||||
|
self.update_stats.cancel()
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
"""Adds the cog to the bot."""
|
"""Adds the cog to the bot."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue