I am trying to make a discord bot reminder command, however, I am running through an issue.
When I do the command, it executes the sleep time perfectly, however, it doesn't show the reminder that I have set.
Example: When I do /reminder 5m Fix the server, it should send Alright, I will remind you about Fix the server in 5 minutes., However, it is sending this instead: Alright, I will remind you about {} in 5 minutes.
And also when I don't include the reminder argument it should send an error message, but it does nothing instead.
Here is my code:
#bot.command(case_insensitive = True, aliases = ["remind", "remindme", "remind_me"])
#commands.bot_has_permissions(attach_files = True, embed_links = True)
async def reminder(ctx, *time, **reminder):
user = ctx.message.author
embed = discord.Embed(title="Please specify a proper duration, send `reminder_help` for more information.", description="", color=0x55a7f7, timestamp=datetime.utcnow())
embed.set_footer(text="If you have any questions, suggestions or bug reports, please join our support Discord Server: link hidden", icon_url=f"{bot.user.avatar_url}")
embed2 = discord.Embed(title="Please specify what do you want me to remind you about.", description="", color=0x55a7f7, timestamp=datetime.utcnow())
embed2.set_footer(text="If you have any questions, suggestions or bug reports, please join our support Discord Server: link hidden", icon_url=f"{bot.user.avatar_url}")
embed3 = discord.Embed(title="You have specified a too long duration!\nMaximum duration is 90 days.", color=0x55a7f7, timestamp=datetime.utcnow())
embed3.set_footer(text="If you have any questions, suggestions or bug reports, please join our support Discord Server: link hidden", icon_url=f"{bot.user.avatar_url}")
embed4 = discord.Embed(title="You have specified a too short duration!\nMinimum duration is 5 minutes.", color=0x55a7f7, timestamp=datetime.utcnow())
embed4.set_footer(text="If you have any questions, suggestions or bug reports, please join our support Discord Server: link hidden", icon_url=f"{bot.user.avatar_url}")
seconds = 0
if reminder is None:
await ctx.send(embed=embed2) # Error message
return
for i in time:
if i.lower().endswith("d"):
seconds += int(i[:-1]) * 60 * 60 * 24
counter = f"{seconds//60//60//24} days"
if i.lower().endswith("h"):
seconds += int(i[:-1]) * 60 * 60
counter = f"{seconds//60//60} hours"
elif i.lower().endswith("m"):
seconds += int(i[:-1]) * 60
counter = f"{seconds//60} minutes"
elif i.lower().endswith("s"):
seconds += int(i[:-1])
counter = f"{seconds} seconds"
if seconds == 0:
await ctx.send(embed=embed) # Error message
return
elif seconds < 300:
await ctx.send(embed=embed4) # Error message
return
elif seconds > 7776000:
await ctx.send(embed=embed3) # Error message
return
else:
await ctx.send(f"Alright, I will remind you about {reminder} in {counter}.")
await asyncio.sleep(seconds)
await ctx.send(f"Hi, you asked me to remind you about {reminder} {counter} ago.")
Any help would be appreciated, thanks in advance.
I solved your question with changing a few thing"s" in your code. So here is the new code:
#client.command(case_insensitive = True, aliases = ["remind", "remindme", "remind_me"])
#commands.bot_has_permissions(attach_files = True, embed_links = True)
async def reminder(ctx, time, *, reminder):
print(time)
print(reminder)
user = ctx.message.author
embed = discord.Embed(color=0x55a7f7, timestamp=datetime.utcnow())
embed.set_footer(text="If you have any questions, suggestions or bug reports, please join our support Discord Server: link hidden", icon_url=f"{client.user.avatar_url}")
seconds = 0
if reminder is None:
embed.add_field(name='Warning', value='Please specify what do you want me to remind you about.') # Error message
if time.lower().endswith("d"):
seconds += int(time[:-1]) * 60 * 60 * 24
counter = f"{seconds // 60 // 60 // 24} days"
if time.lower().endswith("h"):
seconds += int(time[:-1]) * 60 * 60
counter = f"{seconds // 60 // 60} hours"
elif time.lower().endswith("m"):
seconds += int(time[:-1]) * 60
counter = f"{seconds // 60} minutes"
elif time.lower().endswith("s"):
seconds += int(time[:-1])
counter = f"{seconds} seconds"
if seconds == 0:
embed.add_field(name='Warning',
value='Please specify a proper duration, send `reminder_help` for more information.')
elif seconds < 300:
embed.add_field(name='Warning',
value='You have specified a too short duration!\nMinimum duration is 5 minutes.')
elif seconds > 7776000:
embed.add_field(name='Warning', value='You have specified a too long duration!\nMaximum duration is 90 days.')
else:
await ctx.send(f"Alright, I will remind you about {reminder} in {counter}.")
await asyncio.sleep(seconds)
await ctx.send(f"Hi, you asked me to remind you about {reminder} {counter} ago.")
return
await ctx.send(embed=embed)
First of all, I don't know what causes the problem but you use a for loop for no reason, it's unnecessary. Then you don't have to create embeds for 4 times, you can just use add_field. So it works now. If you still have problem, just comment.
Related
I'm trying to make a discord bot with a remind command. I would like the remind command to be able to do like ;remind 12.5m or ;remind 1h 12m 30s. but right now the remind command can only be used like ;remind 45m, ;remind 2h, ;remind 9m. basically the command only works if only one time is included. I'm not sure how to make the command work with multiple time included, can someone help me?
#client.command(case_insensitive=True, aliases=["reminder", "rm"])
async def remind(ctx, time, *, reminder="something"):
user = ctx.author.mention
channel = client.get_channel(12345678912345)
seconds = 0
log = discord.Embed(color=0xe9a9a9, timestamp=datetime.utcnow())
embed = discord.Embed(color=0xe9a9a9)
if time.lower().endswith("d"):
seconds += int(time[:-1]) * 60 * 60 * 24
counter = f"{seconds // 60 // 60 // 24} days"
if time.lower().endswith("h"):
seconds += int(time[:-1]) * 60 * 60
counter = f"{seconds // 60 // 60} hours"
if time.lower().endswith("m"):
seconds += int(time[:-1]) * 60
counter = f"{seconds // 60} minutes"
if time.lower().endswith("s"):
seconds += int(time[:-1])
counter = f"{seconds} seconds"
if seconds == 0 or seconds > 7776000:
await ctx.send("Please specify a valid time.")
if reminder is None:
await ctx.send("Please tell me what to remind you.")
else:
log.set_author(name=f"{ctx.author.display_name}#{ctx.author.discriminator} - Remind", icon_url=ctx.author.avatar_url)
log.set_footer(text=f"{counter} | {reminder}")
embed.add_field(
name="**Reminder**",
value=f"{user}, you asked me to remind you to `{reminder}` `{counter}` ago."
)
await ctx.send(f"Alright, I will remind you about `{reminder}` in `{counter}`.")
await asyncio.sleep(seconds)
await ctx.author.send(embed=embed)
await channel.send(embed=log)
return
When you do
remind(ctx, time, *, reminder='something')
The * bit is saying that when you call that function any parameters after that point have to be a named ones.
Instead if put the * in front of time then you are triggering a completely different behavior, and time will become a list of all of the different times given to you. Like so.
async def remind(ctx, *times, reminder="something"):
for time in times:
# move the code here
# Getting rid of the return statement at the end
However it will run each timer sequentially, waiting to count down the second one until the first one is finished. If you want to start all of the timers at once, since we're already using asyncio, there is a way we can easily accomplish this with asyncio.gather.
async def remind(ctx, *times, reminder="something"):
asyncio.gather(*[_remind(ctx, time, reminder) for time in times])
async def _remind(ctx, time, reminder):
# All of the code that was in your original remind runction
# would go here instead
Bytheway, once again the star (the one in async.gather) is acting in a different way.
Looks like you are using * for the reminder, meaning all provided times after the first one will be stored in your reminder variable. You can search the reminder variable for and valid times at the very start of the string.
I was trying to create a discord bot with giveaway command which updates time left every 1-2 mins in giveaway embed . I have been trying it since 3 days but wasn't able to find a solution. I managed to make it update seconds, but if I specify time more than 1m i.e. 60 seconds it automatically converts it to seconds and starts giveaway with time left in just seconds . I want it to keep time in given unit and update time in --days, --hours, --minutes, --seconds left.
Here are a few images what i mean:
What it currently do:
What i want it to do:
Its just Ends In Or Time remaining what i want to be changed!
My current code:
#commands.command()
#commands.guild_only()
async def gstart(self, ctx, duration, *, prize):
time = self.convert(duration)
if time == -1:
await ctx.send(f'Answer Time With A Proper Unit (s, m, h, d)')
return
elif time == -2:
await ctx.send(f'Time Must Be A Integer!')
return
giveawayembed = discord.Embed(
title="🎉 New Giveaway! 🎉",
description=f"**Prize:** {prize}\n"
f"**Hosted By:** {ctx.author.mention}\n"
f"**Ends In:** {time} Seconds",
colour=discord.Color.green()
)
msg = await ctx.send(embed=giveawayembed)
reactions = await msg.add_reaction("🎉")
while time:
await sleep(10)
time -= 10
giveawayembed.description= f"**Prize:** {prize}\n**Hosted By:** {ctx.author.mention}\n**Ends In:** {time} Seconds"
await msg.edit(embed=giveawayembed)
new_msg = await ctx.fetch_message(msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(self.client.user))
winner = random.choice(users)
endembed = discord.Embed(
title="Giveaway ended!",
description=f"Prize: {prize}\nWinner: {winner.mention}")
await msg.edit(embed=endembed)
await ctx.send(f"🎉 Giveaway Winner: {winner.mention} | Prize: {prize}")
For Converting Time I Have:
class Giveaway(commands.Cog):
def __init__(self, client):
self.client = client
def convert(self, time):
pos = ["s", "m", "h", "d"]
time_dict = {"s" : 1, "m" : 60, "h" : 3600, "d" : 3600*24}
unit = time[-1]
if unit not in pos:
return -1
try:
val = int(time[:-1])
except:
return -2
return val * time_dict[unit]
Any help is highly appreciated! 😁
And I m sorry if I wasn't able to make you understand my problem. 😅
I understand your problem as it is actually a very simple fix, you can either import time, or use await asyncio.sleep(time)
Before using the code I am providing, make sure to import asyncio in your imports.
Your code:
#commands.command()
#commands.guild_only()
async def gstart(self, ctx, duration, *, prize):
time = self.convert(duration)
if time == -1:
await ctx.send(f'Answer Time With A Proper Unit (s, m, h, d)')
return
elif time == -2:
await ctx.send(f'Time Must Be A Integer!')
return
giveawayembed = discord.Embed(
title="🎉 New Giveaway! 🎉",
description=f"**Prize:** {prize}\n"
f"**Hosted By:** {ctx.author.mention}\n"
f"**Ends In:** {time} Seconds",
colour=discord.Color.green()
)
msg = await ctx.send(embed=giveawayembed)
reactions = await msg.add_reaction("🎉")
while time:
await sleep(10)
time -= 10
giveawayembed.description= f"**Prize:** {prize}\n**Hosted By:** {ctx.author.mention}\n**Ends In:** {time} Seconds"
await msg.edit(embed=giveawayembed)
new_msg = await ctx.fetch_message(msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(self.client.user))
winner = random.choice(users)
endembed = discord.Embed(
title="Giveaway ended!",
description=f"Prize: {prize}\nWinner: {winner.mention}")
await msg.edit(embed=endembed)
await ctx.send(f"🎉 Giveaway Winner: {winner.mention} | Prize: {prize}")
In both fixes I will fix a slight problem that could easily be fixed, you have it so while time, it will go down by 10, I recommend doing it so it says while time > 0: so that once it hits 0 it wont keep counting down.
Easy fix using await asyncio.sleep(time):
#commands.command()
#commands.guild_only()
async def gstart(self, ctx, duration, *, prize):
time = self.convert(duration)
if time == -1:
await ctx.send(f'Answer Time With A Proper Unit (s, m, h, d)')
return
elif time == -2:
await ctx.send(f'Time Must Be A Integer!')
return
giveawayembed = discord.Embed(
title="🎉 New Giveaway! 🎉",
description=f"**Prize:** {prize}\n"
f"**Hosted By:** {ctx.author.mention}\n"
f"**Ends In:** {time} Seconds",
colour=discord.Color.green()
)
msg = await ctx.send(embed=giveawayembed)
reactions = await msg.add_reaction("🎉")
while time >= 0:
if time <= 60:
giveaway.remove_field(index=1)
giveaway.insert_field_at(index=1, name='Ends:', value=f'{time} second(s) from now')
await my_msg.edit(embed=giveaway)
time -= 10
await asyncio.sleep(10)
elif 60 <= time < 3600:
giveaway.remove_field(index=1)
giveaway.insert_field_at(index=1, name='Ends:', value=f'{time/60} minute(s) from now')
await my_msg.edit(embed=giveaway)
time -= 6
await asyncio.sleep(6)
elif 3600 <= time < 86400:
giveaway.remove_field(index=1)
giveaway.insert_field_at(index=1, name='Ends:', value=f'{time/3600} hour(s) from now')
await my_msg.edit(embed=giveaway)
time -= 360
await asyncio.sleep(360)
elif time >= 86400:
giveaway.remove_field(index=1)
giveaway.insert_field_at(index=1, name='Ends:', value=f'{time/86400} day(s) from now')
await my_msg.edit(embed=giveaway)
time -= 8640
await asyncio.sleep(8640)
if time <= 0:
giveaway.remove_field(index=1)
giveaway.insert_field_at(index=1, name='Ends:', value=f'Ended at {datetime.datetime.now().strftime("%B %d, %I:%M %p")}') # noqa
await my_msg.edit(embed=giveaway)
await asyncio.sleep(time)
new_msg = await ctx.fetch_message(msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(self.client.user))
winner = random.choice(users)
endembed = discord.Embed(
title="Giveaway ended!",
description=f"Prize: {prize}\nWinner: {winner.mention}")
await msg.edit(embed=endembed)
await ctx.send(f"🎉 Giveaway Winner: {winner.mention} | Prize: {prize}")
If you are still confused or have any more questions you can contact me on discord at killrebeest#7187 or comment on this answer. Have a good day!
I found this reminder command (on Stackoverflow) and I corrected some bits to go according to my cog. So there is this bit in the code which is utcnow and PyCharm can't find it in datetime
Code
#commands.command(case_insensitive=True, aliases=["remind", "remindme", "remind_me"])
#commands.bot_has_permissions(attach_files=True, embed_links=True)
async def reminder(self, ctx, time, *, reminder, counter):
print(time)
print(reminder)
user = ctx.message.author
embed = discord.Embed(color=0x55a7f7, timestamp=datetime.utcnow())
embed.set_footer(
text="If you have any questions, suggestions or bug reports, please join our support Discord Server: link hidden",
icon_url=f"{self.client.user.avatar_url}")
seconds = 0
if reminder is None:
embed.add_field(name='Warning',
value='Please specify what do you want me to remind you about.') # Error message
if time.lower().endswith("d"):
seconds += int(time[:-1]) * 60 * 60 * 24
counter = f"{seconds // 60 // 60 // 24} days"
if time.lower().endswith("h"):
seconds += int(time[:-1]) * 60 * 60
counter = f"{seconds // 60 // 60} hours"
elif time.lower().endswith("m"):
seconds += int(time[:-1]) * 60
counter = f"{seconds // 60} minutes"
elif time.lower().endswith("s"):
seconds += int(time[:-1])
counter = f"{seconds} seconds"
if seconds == 0:
embed.add_field(name='Warning',
value='Please specify a proper duration, send `reminder_help` for more information.')
elif seconds < 300:
embed.add_field(name='Warning',
value='You have specified a too short duration!\nMinimum duration is 5 minutes.')
elif seconds > 7776000:
embed.add_field(name='Warning',
value='You have specified a too long duration!\nMaximum duration is 90 days.')
else:
await ctx.send(f"Alright, I will remind you about {reminder} in {counter}.")
await asyncio.sleep(seconds)
await ctx.send(f"Hi, you asked me to remind you about {reminder} {counter} ago.")
return
await ctx.send(embed=embed)
First of all, make sure you are importing the datetime library:
import datetime
Depending on your import, the correct call to the datetime functions will be something like this:
datetime.datetime.utcnow()
This happens because you are actually importing a file like datetime.py and within it exists the class you want to use, called datetime.
For some reference, the whole call explained:
datetime - tells python to select in the datetime module
datetime - tells python to select the class datatime in that module
utcnow - tells python to select the method utcnow in that class
() - execute that module.
I have a bot made using discord.py. I added a suggest command and added cooldown to it. After that I added this code:
#suggest.error
async def suggest_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
msg = 'You are too fast! Please try again in {:.2f}s'.format(error.retry_after)
await ctx.send(msg)
else:
raise error
Now, it shows the time in seconds, how do I make it show in hr:min:sec format?
You can do it using the datetime module
import datetime
remaining_time = str(datetime.timedelta(seconds=int(error.retry_after)))
def hms_from_secs(seconds: int) -> str:
seconds = int(seconds)
hours = seconds // 3600
minutes = (seconds % 3600) // 60
seconds = seconds % 60
return f"{hours:02} hour(s) {minutes:02} minute(s)"
So, I'm trying to create a reminder function using discord.py. This is my code:
#client.command(name = "reminder", brief = "I'll send a message to the future.",
description = "State what I have to remind you, as well as when and in which channel and I'll do it! "
"Write d for days, h for hours, m for minutes and s for seconds after the number and then "
"what you want to be remided of. For example: >reminder 1h 30m eat chocolate",
aliases = ["remind", "remindme", "remindto"])
async def reminder(ctx, time, *, reminder):
user = ctx.message.author
seconds = 0
if reminder is None:
ctx.send("Please, tell me what you want me to remind you about!")
if time.lower().endswith("d"):
seconds += float(time[:-1]) * 60 * 60 * 24
counter = f"{seconds // 60 // 60 // 24} days"
if time.lower().endswith("h"):
seconds += float(time[:-1]) * 60 * 60
counter = f"{seconds // 60 // 60} hours"
if time.lower().endswith("m"):
seconds += float(time[:-1]) * 60
counter = f"{seconds // 60} minutes"
if time.lower().endswith("s"):
seconds += float(time[:-1])
counter = f"{seconds} seconds"
if seconds == 0:
await ctx.send("You can't tell me that!")
else:
await ctx.send(f"Alright, I will remind you about {reminder} in {counter}.")
await asyncio.sleep(seconds)
await ctx.send(f"Hi, <#{user.id}>, you asked me to remind you about {reminder} {counter} ago.")
return
My issue is that I have no clue how to make it work when someone write more than one argument for "time". So for instance, if I call the function >reminder 1h 30min eat chocolate, it will remind me in 1h to "30min eat chocolate", instead of reminding me in 1h 30min. I don't know if there is a way to fix this (apart from writing 1.5h). Any input will be useful. Thanks a lot!
The message your user in inputting is "somewhere" split into parameters that then call the async method you posted. The "splitting" of the user input is NOT done in the code you showed.
If you want to handle '1d 3hours 52sec Check StackOverflow for answers.' as user input you need to change the way this message is split before calling async def reminder(ctx, time, *, reminder) with the split parameters.
You need to change it so that time gets provided as '1d 3hours 52sec' and reminder is provided as 'Check StackOverflow for answers.':
# correctly proivided params
reminder(ctx, "1d 3hours 52sec", *, reminder="Check StackOverflow for answers")
If you are unable to change this splitting behaviour, forbid spaces inside the time-component of the message the user uses:
It seems that your users text is currently split at spaces and the first is provided for time and the remainder as reminder message.
If you forbid spaces inside time-components you can change your method to parse the time correctly for inputs like '1d3hours52sec Check StackOverflow for answers.'.
This could be a -non async- implementation of a method that handles above messages:
Some helper methods and imports:
imort time
def format_seconds(secs):
# mildly adapted from source: https://stackoverflow.com/a/13756038/7505395
# by Adam Jacob Muller
"""Accepts an integer of seconds and returns a minimal string formatted into
'a years, b months, c days, d hours, e minutes, f seconds' as needed."""
periods = [
('year', 60*60*24*365),
('month', 60*60*24*30),
('day', 60*60*24),
('hour', 60*60),
('minute', 60),
('second', 1)
]
strings=[]
for period_name, period_seconds in periods:
if secs > period_seconds:
period_value , secs = divmod(secs, period_seconds)
has_s = 's' if period_value > 1 else ''
strings.append("%s %s%s" % (period_value, period_name, has_s))
return ", ".join(strings)
def convert_timestring_to_seconds(time):
"""Convert a math expression to integer,only allows [0..9+* ] as chars."""
if not all(c in "1234567890+* " for c in time):
raise Exception()
# this are seconds - using eval as we can be sure nothing harmful can be in it
# if you are paranoid, use https://stackoverflow.com/a/33030616/7505395 instead
count = eval(time)
if type(count) != int:
raise Exception()
return count
a mock for your methods context object:
class MockContext:
def __init__(self):
class User:
def __init__(self):
self.id = "mee-id"
def __str__(self):
return "mee"
class Message:
def __init__(self):
self.author = User()
self.message = Message()
self.send = print
and your changed-up method (non-async and mocked for minimal reproducible example purposes):
def reminder(ctx, time, *, reminder):
user = ctx.message.author
if not time:
ctx.send("Please, tell me WHEN you want me to remind you!")
return
elif not reminder:
ctx.send("Please, tell me WHAT you want me to remind you about!")
return
# order and 3.7+ is important - (else use the sorting one down below)
replacer = {"days":24*60*60, "hours":60*60, "minutes":60, "min":60,
"seconds":1, "sec":1, "d":24*60*60, "h":60, "m":60, "s":1}
safe_time = time # for error output we remember the original input for time
for unit in replacer: # or sorted(replacer, key=len, reverse=True) below 3.8
time = time.replace(unit, f"*{replacer[unit]}+")
time = time.rstrip("+")
try:
count = convert_timestring_to_seconds(time)
except Exception as ex:
ctx.send(f"Unable to understand the time of '{safe_time}'!", ex)
return
if count == 0:
ctx.send("You can't tell me that!")
else:
counter = format_seconds(count)
ctx.send(f"Alright, I will remind you about '{reminder}' in '{counter}'.")
import time
time.sleep(2)
ctx.send(f"Hi, <#{user.id}>, you asked me to remind you about '{reminder}' some '{counter}' ago.")
This is callable like so:
context_mock = MockContext()
reminder(context_mock, "1d5min270seconds", reminder = "abouth this")
reminder(context_mock, "1d5min270seconds", reminder = "")
reminder(context_mock, "", reminder = "")
reminder(context_mock, "buffalo", reminder = "abouth this")
and produces the following outputs:
# reminder(context_mock, "1d5min270seconds", reminder = "abouth this")
Alright, I will remind you about 'abouth this' in '1 day, 9 minutes, 30 seconds'.
<2s delay>
Hi, <#mee-id>, you asked me to remind you about 'abouth this' some '1 day, 9 minutes, 30 seconds' ago.
# reminder(context_mock, "1d5min270seconds", reminder = "")
Please, tell me WHAT you want me to remind you about!
# reminder(context_mock, "", reminder = "")
Please, tell me WHEN you want me to remind you!
# reminder(context_mock, "buffalo", reminder = "abouth this")
Unable to understand the time of 'buffalo'!
This is how I ended up fixing the issue:
async def reminder(ctx):
user = ctx.message.author
def check(msg):
return msg.author == ctx.author and msg.channel == ctx.channel
#and type(msg.content) == int
await ctx.send("Oh my! Yes, tell me, what do you need to remember?")
reminder = await client.wait_for("message", check=check)
await ctx.send("Okay! When do you want me to remind you that? (d for days, h for hours, m for minutes, s for seconds)")
Time = await client.wait_for("message", check=check)
times = str(Time.content)
Times = times.split()
seconds = 0
for time in Times:
if time.lower().endswith("d"):
seconds += float(time[:-1]) * 60 * 60 * 24
counter = f"{seconds // 60 // 60 // 24} days"
if time.lower().endswith("h"):
seconds += float(time[:-1]) * 60 * 60
counter = f"{seconds // 60 // 60} hours"
if time.lower().endswith("m"):
seconds += float(time[:-1]) * 60
counter = f"{seconds // 60} minutes"
if time.lower().endswith("s"):
seconds += float(time[:-1])
counter = f"{seconds} seconds"
if seconds == 0:
await ctx.send("You can't tell me that!")
else:
await ctx.send(f"Alright, I will remind you about {reminder.content} in {times}.")
await asyncio.sleep(seconds)
await ctx.send(f"Hi, <#{user.id}>, you asked me to remind you about {reminder.content} some time ago. "
f"Don't forget about it!")
So, instead of messing with the arguments of the function, the bot will be asking the user for the reminder and the time separately.