From 5dbdd3daa39961968711c946f55e1a799f6bb040 Mon Sep 17 00:00:00 2001 From: mrfluffy Date: Thu, 28 Aug 2025 01:16:08 +0100 Subject: [PATCH] webooookkkks --- bot.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 4755fe4..c3cf040 100644 --- a/bot.py +++ b/bot.py @@ -31,8 +31,19 @@ async def on_message(message): message.content, flags=re.IGNORECASE ) - # Send the modified message - await message.channel.send(f'{new_content}') + + # Get or create a webhook for impersonation + webhooks = await message.channel.webhooks() + webhook = next((w for w in webhooks if w.name == 'FagOSWebhook'), None) + if webhook is None: + webhook = await message.channel.create_webhook(name='FagOSWebhook') + + # Send the modified message via webhook with original user's username and avatar + await webhook.send( + content=new_content, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url + ) # Allow other commands to process (if any) await bot.process_commands(message)