diff options
Diffstat (limited to 'bot.py')
| -rw-r--r-- | bot.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -261,8 +261,9 @@ async def on_random(message) -> bool: # single weighted pick between sticker/emoji/media, used as a substitute for an actual # llm reply — only called once on_message already decided this message gets a response. # returns True if it fired (caller should skip the llm call), False if it should proceed normally. - stickers = list(message.guild.stickers) - emojis = [str(e) for e in message.guild.emojis] + # skip locked/role-restricted ones, discord rejects those (50081 / 10014) + stickers = [s for s in message.guild.stickers if s.available] + emojis = [str(e) for e in message.guild.emojis if e.available and not e.roles] options = [] if stickers: |
