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
|
||||
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):
|
||||
"""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)
|
||||
else:
|
||||
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":
|
||||
await interaction.response.send_message(content="That user has their direct messages closed!", ephemeral=True)
|
||||
elif target_type == "textchannel":
|
||||
|
|
Loading…
Reference in a new issue