rf: replies through common function
This commit is contained in:
parent
b1e353a890
commit
a4cf15ce1d
1 changed files with 1 additions and 4 deletions
3
main.py
3
main.py
|
@ -40,9 +40,6 @@ async def reply(ctx, message: str):
|
||||||
:param ctx: The context of the command or the channel from the event handler.
|
:param ctx: The context of the command or the channel from the event handler.
|
||||||
:param message: The message to reply with.
|
: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:
|
else:
|
||||||
logger.error(f'Failed to send the following message: "{message}"')
|
logger.error(f'Failed to send the following message: "{message}"')
|
||||||
|
|
Loading…
Reference in a new issue