きれそう

This commit is contained in:
suti7yk5032 2024-07-07 15:48:43 +09:00
parent 4ecf209e7e
commit 73502817e0

View file

@ -60,7 +60,8 @@ class DL():
print("データベースに接続できません。\nエラー内容\n" + error) print("データベースに接続できません。\nエラー内容\n" + error)
result = {"result": "error"} result = {"result": "error"}
return result finally:
return result
class Bot(discord.Client): class Bot(discord.Client):
@ -140,8 +141,7 @@ class Bot(discord.Client):
finally: finally:
cursor.close() cursor.close()
return result
return result
def stop(self, **kwargs): def stop(self, **kwargs):
try: try:
@ -164,7 +164,9 @@ class Bot(discord.Client):
print("停止処理にエラーが発生しました。") print("停止処理にエラーが発生しました。")
result = {"result": "error"} result = {"result": "error"}
return result finally:
cursor.close()
return result
def user_register(self, **kwargs): def user_register(self, **kwargs):
try: try:
@ -187,8 +189,7 @@ class Bot(discord.Client):
finally: finally:
cursor.close() cursor.close()
return result
return result
def report_export(self, **kwargs): def report_export(self, **kwargs):
try: try:
@ -234,8 +235,7 @@ class Bot(discord.Client):
finally: finally:
cursor.close() cursor.close()
return result
return result
async def on_ready(self): async def on_ready(self):
print("ログイン成功") print("ログイン成功")