better check for the call in the db
This commit is contained in:
parent
bdc17c1fef
commit
b0ed0c918e
1 changed files with 5 additions and 3 deletions
|
@ -123,11 +123,13 @@ class Reminder(Database):
|
||||||
if page + 1 <= int(infoDescription[2]):
|
if page + 1 <= int(infoDescription[2]):
|
||||||
page += 1
|
page += 1
|
||||||
else:
|
else:
|
||||||
pageMAX = -(-len(self.listeReminder(utilisateur.id, payload.guild_id)) // 5)
|
if len(findall(r"L'utilisateur n'a aucun rappel en attente ou page n°\d+ vide !", embed["fields"][0]["value"])) == 1:
|
||||||
if pageMAX > 1:
|
if len(self.listeReminder(utilisateur.id, payload.guild_id)) > 0:
|
||||||
page += 1
|
page += 1
|
||||||
else:
|
else:
|
||||||
return False, False
|
return False, False
|
||||||
|
else:
|
||||||
|
return False, False
|
||||||
embed, _ = Reminder().embedListe(utilisateur, payload.guild_id, page, embed["color"])
|
embed, _ = Reminder().embedListe(utilisateur, payload.guild_id, page, embed["color"])
|
||||||
return message, embed
|
return message, embed
|
||||||
return False, False
|
return False, False
|
||||||
|
|
Reference in a new issue