update reminderlist even when the pageMAX in the message is less or equal than 1
This commit is contained in:
parent
79ec9cdc57
commit
bdc17c1fef
1 changed files with 6 additions and 2 deletions
|
@ -73,7 +73,7 @@ class Reminder(Database):
|
|||
def embedListe(self, utilisateur, guildID, page, color = None):
|
||||
"""Fais l'embed d'une page pour l'affichage de la liste des reminders d'un utilisateur"""
|
||||
reminders = self.listeReminder(utilisateur.id, guildID)
|
||||
|
||||
|
||||
pageMAX = -(-len(reminders) // 5)
|
||||
if color == None:
|
||||
color = Colour.random()
|
||||
|
@ -123,7 +123,11 @@ class Reminder(Database):
|
|||
if page + 1 <= int(infoDescription[2]):
|
||||
page += 1
|
||||
else:
|
||||
return False, False
|
||||
pageMAX = -(-len(self.listeReminder(utilisateur.id, payload.guild_id)) // 5)
|
||||
if pageMAX > 1:
|
||||
page += 1
|
||||
else:
|
||||
return False, False
|
||||
embed, _ = Reminder().embedListe(utilisateur, payload.guild_id, page, embed["color"])
|
||||
return message, embed
|
||||
return False, False
|
||||
|
|
Reference in a new issue