Skip to content
Discussion options

You must be logged in to vote

So using discord.py + requests libraries & a script:

import aiohttp
import discord
from discord import Webhook

intents = discord.Intents.all()
intents.members = True
bot = commands.Bot(command_prefix=PREFIX, intents=intents)

@bot.event
async def on_message(message):
    if message.author == bot.user:
        return
    async with aiohttp.ClientSession() as session:
        webhook = Webhook.from_url('webhook_url', session=session)
        await webhook.send(content=message.content, username=message.author.name, avatar_url=message.author.avatar.url)

is the solution.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Rapptz
Comment options

@GamePlayer-8
Comment options

@Rapptz
Comment options

@GamePlayer-8
Comment options

Answer selected by Rapptz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants