delete OF message
This commit is contained in:
2
bot.py
2
bot.py
@@ -37,6 +37,8 @@ async def on_message(message):
|
|||||||
webhook = next((w for w in webhooks if w.name == 'FagOSWebhook'), None)
|
webhook = next((w for w in webhooks if w.name == 'FagOSWebhook'), None)
|
||||||
if webhook is None:
|
if webhook is None:
|
||||||
webhook = await message.channel.create_webhook(name='FagOSWebhook')
|
webhook = await message.channel.create_webhook(name='FagOSWebhook')
|
||||||
|
|
||||||
|
await message.delete() # Delete the original
|
||||||
|
|
||||||
# Send the modified message via webhook with original user's username and avatar
|
# Send the modified message via webhook with original user's username and avatar
|
||||||
await webhook.send(
|
await webhook.send(
|
||||||
|
|||||||
Reference in New Issue
Block a user