summaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
authorstolenvw <stolenvw@hotmail.com>2021-04-13 17:12:16 -0400
committerstolenvw <stolenvw@hotmail.com>2021-04-13 17:12:16 -0400
commitbb01f1a0ca617be1ea4ef64219e032cf946163e7 (patch)
treec65094c6db7e596af7396388c3bd1a1105a9a888 /code
parent90c4debcbc961b342353a6576501ffe096329068 (diff)
Fixed an error where bot would stop working if server went off-line
Diffstat (limited to 'code')
-rw-r--r--code/plusbot.py2
1 files changed, 1 insertions, 1 deletions
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)