mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
refactor(makeprompt.py): rename variables for clarity and remove unnecessary pass statement
This commit is contained in:
@@ -74,7 +74,6 @@ def get_guild_data(message):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
premium = 0
|
premium = 0
|
||||||
raise e
|
raise e
|
||||||
pass
|
|
||||||
try:
|
try:
|
||||||
curs_data.execute(
|
curs_data.execute(
|
||||||
"SELECT * FROM images WHERE guild_id = ?", (mg_to_guid(message),)
|
"SELECT * FROM images WHERE guild_id = ?", (mg_to_guid(message),)
|
||||||
@@ -243,15 +242,15 @@ async def chat_process(self, message):
|
|||||||
|
|
||||||
channels = []
|
channels = []
|
||||||
try:
|
try:
|
||||||
con_premium.execute(
|
curs_premium.execute(
|
||||||
"SELECT * FROM channels WHERE guild_id = ?", (mg_to_guid(message),) )
|
"SELECT * FROM channels WHERE guild_id = ?", (mg_to_guid(message),) )
|
||||||
images_data = curs_premium.fetchone()
|
channels_data = curs_premium.fetchone()
|
||||||
if guild_data["premium"]:
|
if guild_data["premium"]:
|
||||||
# for 5 times, we get c.fetchone()[1] to c.fetchone()[5] and we add it to the channels list, each time with try except
|
# for 5 times, we get c.fetchone()[1] to c.fetchone()[5] and we add it to the channels list, each time with try except
|
||||||
for i in range(1, 6):
|
for i in range(1, 6):
|
||||||
# we use the i variable to get the channel id
|
# we use the i variable to get the channel id
|
||||||
try:
|
try:
|
||||||
channels.append(str(images_data[i]))
|
channels.append(str(channels_data[i]))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user