Testing error on twitch loop
This commit is contained in:
parent
38d4a92235
commit
6336244dd4
|
@ -16,6 +16,7 @@ def channelOnline(channel: str):
|
|||
|
||||
|
||||
async def checkChannels(bot):
|
||||
try:
|
||||
await bot.wait_until_ready()
|
||||
cursor = config.getCursor()
|
||||
cursor.execute('use {}'.format(config.db_default))
|
||||
|
@ -37,6 +38,12 @@ async def checkChannels(bot):
|
|||
.format(member.name, url))
|
||||
config.closeConnection()
|
||||
await asyncio.sleep(60)
|
||||
except Exception as e:
|
||||
|
||||
server = discord.utils.find(lambda s: s.id == "183662839741939712", bot.servers)
|
||||
channel = discord.utils.find(lambda c: c.id == "184201951381028864", server.channels)
|
||||
fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
|
||||
await bot.send_message(, fmt.format(type(error).__name__, error))
|
||||
|
||||
|
||||
class Twitch:
|
||||
|
|
Loading…
Reference in a new issue