fix: don't edit on channel send
This commit is contained in:
parent
d3fd79e87f
commit
c0173b87e9
2
core.py
2
core.py
@ -98,7 +98,7 @@ async def on_message(message, edited=False):
|
||||
elif len(output.strip()) == 0:
|
||||
await utils.add_check_reaction(message)
|
||||
else:
|
||||
await utils.channel_send(message, output)
|
||||
await utils.reply(message, output)
|
||||
case C.CLEAR | C.PURGE if message.author.id in constants.OWNERS:
|
||||
await commands.tools.clear(message)
|
||||
case C.JOIN:
|
||||
|
12
utils.py
12
utils.py
@ -49,15 +49,9 @@ async def reply(message, *args, **kwargs):
|
||||
|
||||
|
||||
async def channel_send(message, *args, **kwargs):
|
||||
if message.id in message_responses:
|
||||
await message_responses[message.id].edit(
|
||||
*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
|
||||
await message.channel.send(
|
||||
*args, **kwargs, allowed_mentions=disnake.AllowedMentions.none()
|
||||
)
|
||||
|
||||
|
||||
async def invalid_user_handler(interaction):
|
||||
|
Loading…
x
Reference in New Issue
Block a user