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
版权声明:本文标题:python - events Pin and Unpin discord.py - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:http://www.betaflare.com/web/1744864648a2629276.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论