This commit is contained in:
parent
d2df32ddaf
commit
71d006165e
1 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
from typing import Union
|
from typing import Union
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands, checks, app_commands
|
from redbot.core import commands, app_commands
|
||||||
|
|
||||||
|
# pylint: disable=arguments-differ
|
||||||
|
|
||||||
class Send(commands.Cog):
|
class Send(commands.Cog):
|
||||||
"""Allows you to send messages as the bot account."""
|
"""Allows you to send messages as the bot account."""
|
||||||
|
@ -20,7 +22,7 @@ class Send(commands.Cog):
|
||||||
await interaction.response.send_message(content=f"Message sent to {target.mention}!\nMessage contents:\n```{message}```\n```{secondary_message}```", ephemeral=True)
|
await interaction.response.send_message(content=f"Message sent to {target.mention}!\nMessage contents:\n```{message}```\n```{secondary_message}```", ephemeral=True)
|
||||||
else:
|
else:
|
||||||
await interaction.response.send_message(content=f"Message sent to {target.mention}!\nMessage contents:\n```{message}```", ephemeral=True)
|
await interaction.response.send_message(content=f"Message sent to {target.mention}!\nMessage contents:\n```{message}```", ephemeral=True)
|
||||||
except (discord.HTTPException, discord.Forbidden) as error:
|
except (discord.HTTPException, discord.Forbidden):
|
||||||
if target_type == "member":
|
if target_type == "member":
|
||||||
await interaction.response.send_message(content="That user has their direct messages closed!", ephemeral=True)
|
await interaction.response.send_message(content="That user has their direct messages closed!", ephemeral=True)
|
||||||
elif target_type == "textchannel":
|
elif target_type == "textchannel":
|
||||||
|
|
Loading…
Reference in a new issue