From bb01f1a0ca617be1ea4ef64219e032cf946163e7 Mon Sep 17 00:00:00 2001 From: stolenvw Date: Tue, 13 Apr 2021 17:12:16 -0400 Subject: Fixed an error where bot would stop working if server went off-line --- code/plusbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/plusbot.py b/code/plusbot.py index 4cf06f2..48ded4e 100644 --- a/code/plusbot.py +++ b/code/plusbot.py @@ -380,7 +380,7 @@ async def serveronline(): await channel.edit(name=f"{emoji.emojize(':cross_mark:')} Server Offline") if sonline == 1: sonline = 0 - botsql = self.bot.get_cog('BotSQL') + botsql = bot.get_cog('BotSQL') mycursor = await botsql.get_cursor() sql2 = """INSERT INTO serverstats (date, timestamp, users) VALUES ('%s', '%s', '%s')""" % (await timenow(), int(time.time()), sonline) mycursor.execute(sql2) -- cgit v1.2.3-70-g09d2