From 090fb736e5cf62c0e5f0a7ee7808387d52275a30 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 14 Oct 2026 22:39:55 -0300 Subject: bot can no longer send unavailable stickers with the tag --- bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index dc2003b..c726fce 100644 --- a/bot.py +++ b/bot.py @@ -436,8 +436,8 @@ def reaction_tool_prompt(guild) -> str: sync_reactions(guild) data = load_reactions() have = { - "stickers": {s.name for s in guild.stickers}, - "emojis": {e.name for e in guild.emojis}, + "stickers": {s.name for s in guild.stickers if s.available}, # unavailable = locked after the boost level dropped + "emojis": {e.name for e in guild.emojis if e.available}, "media": {n for n in saved_media if (MEDIA_DIR / n).is_file()}, } sections = [] @@ -461,13 +461,13 @@ async def send_reaction(message, kind: str, name: str): name = name.strip().strip(":").lower() try: if kind == "sticker": - chosen = next((s for s in message.guild.stickers if s.name.lower() == name), None) + chosen = next((s for s in message.guild.stickers if s.available and s.name.lower() == name), None) if chosen: await message.channel.send(stickers=[chosen]) log_message(f"[{now_str()}] Faggot-chan sent sticker: {chosen.name}") print(f"[{now_str()}] Faggot-chan sent sticker: {chosen.name}") elif kind == "emoji": - chosen = next((e for e in message.guild.emojis if e.name.lower() == name), None) + chosen = next((e for e in message.guild.emojis if e.available and e.name.lower() == name), None) if chosen: await message.add_reaction(chosen) elif kind == "media": -- cgit v1.3-2-g0d8e