force value instead of making them as default
This commit is contained in:
parent
cdbdefb9fc
commit
56be762445
1 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,7 @@ class Reminder(Database):
|
|||
"""
|
||||
self.requete(requete)
|
||||
|
||||
def ajoutReminder(self, messageID = int, channelID = int, extrarg = int, reminder = str, creation = int, expiration = int, userID = int, guildID = int):
|
||||
def ajoutReminder(self, messageID: int, channelID: int, extrarg: int, reminder: str, creation: int, expiration: int, userID: int, guildID: int):
|
||||
"""Ajoute un reminder."""
|
||||
requete = """
|
||||
INSERT INTO reminder (
|
||||
|
@ -33,7 +33,7 @@ class Reminder(Database):
|
|||
self.requete(requete, [messageID, channelID, extrarg, reminder, creation, expiration, userID, guildID])
|
||||
return self.affichageResultat(self.requete("SELECT last_insert_rowid();"))
|
||||
|
||||
def suppressionReminder(self, id = int):
|
||||
def suppressionReminder(self, id: int):
|
||||
"""Supprime un reminder."""
|
||||
requete = """
|
||||
DELETE FROM reminder
|
||||
|
@ -41,7 +41,7 @@ class Reminder(Database):
|
|||
"""
|
||||
self.requete(requete, id)
|
||||
|
||||
def listeReminder(self, userID = int, guildID = int):
|
||||
def listeReminder(self, userID: int, guildID: int):
|
||||
"""Retourne la liste des reminders d'un utilisateur."""
|
||||
requete = """
|
||||
SELECT reminder_str, creation_int, expiration_int, id FROM reminder
|
||||
|
@ -49,7 +49,7 @@ class Reminder(Database):
|
|||
"""
|
||||
return self.affichageResultat(self.requete(requete, [userID, guildID]))
|
||||
|
||||
def recuperationExpiration(self, time = int):
|
||||
def recuperationExpiration(self, time: int):
|
||||
"""Récupère les reminders qui sont arrivés à expiration et ses infos."""
|
||||
requete = """
|
||||
SELECT channel_id, extrarg_id, reminder_str, creation_int, user_id, id, message_id FROM reminder
|
||||
|
@ -57,7 +57,7 @@ class Reminder(Database):
|
|||
"""
|
||||
return self.affichageResultat(self.requete(requete, time))
|
||||
|
||||
def appartenanceReminder(self, user = int, id = int, guildID = int):
|
||||
def appartenanceReminder(self, userID: int, id: int, guildID: int):
|
||||
"""Vérifie qu'un rappel appartiens à un utilisateur et que la guilde soit la bonne. Renvois False si le rappel n'existe pas."""
|
||||
requete = """
|
||||
SELECT EXISTS (
|
||||
|
@ -65,4 +65,4 @@ class Reminder(Database):
|
|||
WHERE id = ? AND user_id = ? AND (guild_id = ? OR guild_id = 0)
|
||||
)
|
||||
"""
|
||||
return True if self.affichageResultat(self.requete(requete, [id, user, guildID]))[0][0] == 1 else False
|
||||
return True if self.affichageResultat(self.requete(requete, [id, userID, guildID]))[0][0] == 1 else False
|
||||
|
|
Reference in a new issue