rf: replies through common function
This commit is contained in:
parent
b1e353a890
commit
a4cf15ce1d
1 changed files with 1 additions and 4 deletions
5
main.py
5
main.py
|
@ -40,10 +40,7 @@ async def reply(ctx, message: str):
|
|||
:param ctx: The context of the command or the channel from the event handler.
|
||||
:param message: The message to reply with.
|
||||
"""
|
||||
if isinstance(ctx, commands.Context):
|
||||
await ctx.send(message)
|
||||
elif isinstance(ctx, discord.abc.Messageable):
|
||||
await ctx.send(message)
|
||||
await ctx.send(message)
|
||||
else:
|
||||
logger.error(f'Failed to send the following message: "{message}"')
|
||||
|
||||
|
|
Loading…
Reference in a new issue