admin管理员组

文章数量:1404927

i have one problem with events on_message_pin and on_message_unpin, both events should be invoked when message is pinned or unpinned, but in my scritp this in no working. I have every intenses i need, and i have good permisions for bot in discord developer portal and role on discord server. Im trying to do a logging system which is sending a message on special logs channel, and everything i want is working and just not this these two events, can somoeone tell me what im a doing wrong? I have version of pip 2.4.0, and python version 3.11. I dont have problem with webhook_url.

@bot.event
async def on_message_pin(message):
    """Logowanie przypinania wiadomości."""
    print(f"Przypinanie wiadomości: {message.id} w kanale {message.channel.id}")
    if message.pinned:  # Sprawdzamy, czy wiadomość jest przypięta
        webhook_url = get_webhook_url(message.guild.id)
        if webhook_url:
            print(f"Wysyłanie logu do webhooka: {webhook_url}")
            embed = discord.Embed(title="

本文标签: pythonevents Pin and Unpin discordpyStack Overflow