Skip to content

Commit 3c84e6e

Browse files
committed
fix: return None from get_guild_ids for global command registration
guilds=[] in lightbulb means 'register nowhere', not 'register globally'. Return None when no testing_guild_id is set so lightbulb falls through to global registration in production.
1 parent c244733 commit 3c84e6e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

luckypot/discord/bot.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ def create_lightbulb_client(bot: hikari.GatewayBot) -> lightbulb.Client:
1616
return lightbulb.client_from_app(bot)
1717

1818

19-
def get_guild_ids() -> list[int]:
20-
"""Get the guild IDs to register slash commands to."""
19+
def get_guild_ids() -> list[int] | None:
20+
"""Get the guild IDs to register slash commands to.
21+
22+
Returns a list with the testing guild when set, or None for global registration.
23+
"""
2124
if settings.testing_guild_id:
2225
return [int(settings.testing_guild_id)]
23-
return []
26+
return None
2427

2528

2629
def _get_guild_channel(bot: hikari.GatewayBot, guild_id: str):

0 commit comments

Comments
 (0)