replace mention by extrarg
This commit is contained in:
parent
2d21d9276b
commit
d473651a6c
2 changed files with 5 additions and 5 deletions
|
@ -491,7 +491,7 @@ class Utils(commands.Cog):
|
|||
reminder = None
|
||||
|
||||
embed = discord.Embed(color = 0xC41B1B)
|
||||
mention = 0
|
||||
extrarg = 0
|
||||
if not reminder:
|
||||
reminder = "Notification"
|
||||
if time == "help":
|
||||
|
@ -499,7 +499,7 @@ class Utils(commands.Cog):
|
|||
else:
|
||||
if time.lower().endswith("@"):
|
||||
time = time[:-1]
|
||||
mention = 1
|
||||
extrarg = 1
|
||||
seconds = stringTempsVersSecondes(time)
|
||||
if type(seconds) != int:
|
||||
if fromSlash != True:
|
||||
|
@ -514,7 +514,7 @@ class Utils(commands.Cog):
|
|||
messageID = None
|
||||
if fromSlash != True:
|
||||
messageID = ctx.message.id
|
||||
Reminder().ajoutReminder(messageID, ctx.channel.id, mention, reminder, now, now + seconds, ctx.author.id, ctx.guild.id)
|
||||
Reminder().ajoutReminder(messageID, ctx.channel.id, extrarg, reminder, now, now + seconds, ctx.author.id, ctx.guild.id)
|
||||
return await ctx.send(f"Ok, je t'en parles dans {timedeltaToString(seconds)} avec 1m de retard maximum.")
|
||||
await ctx.send(embed = embed)
|
||||
@_reminder.error
|
||||
|
|
|
@ -21,7 +21,7 @@ class Reminder(Database):
|
|||
"""
|
||||
self.requete(requete)
|
||||
|
||||
def ajoutReminder(self, messageID = int, channelID = int, mention = 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 (
|
||||
|
@ -30,7 +30,7 @@ class Reminder(Database):
|
|||
?, ?, ?, ?, ?, ?, ?, ?
|
||||
);
|
||||
"""
|
||||
self.requete(requete, [messageID, channelID, mention, reminder, creation, expiration, userID, guildID])
|
||||
self.requete(requete, [messageID, channelID, extrarg, reminder, creation, expiration, userID, guildID])
|
||||
|
||||
def suppressionReminder(self, id = int):
|
||||
"""Supprime un reminder."""
|
||||
|
|
Reference in a new issue