Skip to content

Commit

Permalink
simplified !say command
Browse files Browse the repository at this point in the history
  • Loading branch information
Mole1424 committed Oct 11, 2023
1 parent c42f116 commit 39babb0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions cogs/commands/say.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import discord
from discord import AllowedMentions, app_commands
from discord import AllowedMentions
from discord.ext import commands
from discord.ext.commands import Bot, Context, clean_content

Expand All @@ -14,15 +14,9 @@ class Say(commands.Cog):
def __init__(self, bot: Bot):
self.bot = bot

@app_commands.command(name="say", description=SHORT_HELP_TEXT)
async def say_slash(self, int: discord.Interaction, message: str):
await int.response.send_message(
message, allowed_mentions=AllowedMentions.none()
)

@commands.command(help=LONG_HELP_TEXT, brief=SHORT_HELP_TEXT)
async def say(self, ctx: Context, *message: clean_content):
await ctx.send(" ".join([x.lstrip("@") for x in message]))
@commands.hybrid_command(help=LONG_HELP_TEXT, brief=SHORT_HELP_TEXT)
async def say(self, ctx: Context, *, message: clean_content):
await ctx.send(message)


async def setup(bot: Bot):
Expand Down

0 comments on commit 39babb0

Please sign in to comment.