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:
|
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:
|
||||||
|
8
utils.py
8
utils.py
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user