fix: don't edit on channel send

This commit is contained in:
Ryan 2025-01-06 11:14:40 -05:00
parent d3fd79e87f
commit c0173b87e9
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
2 changed files with 4 additions and 10 deletions

View File

@ -98,7 +98,7 @@ async def on_message(message, edited=False):
elif len(output.strip()) == 0: elif len(output.strip()) == 0:
await utils.add_check_reaction(message) await utils.add_check_reaction(message)
else: else:
await utils.channel_send(message, output) await utils.reply(message, output)
case C.CLEAR | C.PURGE if message.author.id in constants.OWNERS: case C.CLEAR | C.PURGE if message.author.id in constants.OWNERS:
await commands.tools.clear(message) await commands.tools.clear(message)
case C.JOIN: case C.JOIN:

View File

@ -49,15 +49,9 @@ async def reply(message, *args, **kwargs):
async def channel_send(message, *args, **kwargs): async def channel_send(message, *args, **kwargs):
if message.id in message_responses: await message.channel.send(
await message_responses[message.id].edit(
*args, **kwargs, allowed_mentions=disnake.AllowedMentions.none() *args, **kwargs, allowed_mentions=disnake.AllowedMentions.none()
) )
else:
response = await message.channel.send(
*args, **kwargs, allowed_mentions=disnake.AllowedMentions.none()
)
message_responses[message.id] = response
async def invalid_user_handler(interaction): async def invalid_user_handler(interaction):