79496317

Date: 2025-03-09 17:40:00
Score: 1
Natty:
Report link

In the latest version of discord.py, the pins are handled with the on_guild_channels_pins_update event. Your events you have in your code snippet don’t exist, so they will never be called.

https://discordpy.readthedocs.io/en/latest/api.html#discord.on_guild_channel_pins_update

@bot.event
async def on_guild_channel_pins_update(channel, last_pin):
    if last_pin is None:
        # This means that all pins have been removed, or the last pin was removed
        await channel.send(f"The pins in {channel.mention} have been cleared.")
    else:
        # A new pin was added or an existing pin was modified
        await channel.send(f"The pins in {channel.mention} were updated. Last pin at: {last_pin}")
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ryry013