webooookkkks

This commit is contained in:
2025-08-28 01:16:08 +01:00
parent 6e3166a887
commit 5dbdd3daa3

15
bot.py
View File

@@ -31,8 +31,19 @@ async def on_message(message):
message.content, message.content,
flags=re.IGNORECASE 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) # Allow other commands to process (if any)
await bot.process_commands(message) await bot.process_commands(message)