This bug related to code that posted by @Lonami here #3250
the code
import asyncio, functools
def delayed(seconds):
def decorator(func):
@functools.wraps(func)
async def wrapped(*args, **kwargs):
await asyncio.sleep(seconds)
return await func(*args, **kwargs)
return wrapped
return decorator
...
@client.on(events...)
@delayed(5)
async def handler(...): ...
the code works fine to delay send/forward message to channels. but the problem is if i'm using send.message the code copy the message and send it even if it's deleted in source channel
so, is there a way to not sending messages that have been deleted in source channel before sending it to destination channel?