diff --git a/worldtimezone/extensions/world_clock.py b/worldtimezone/extensions/world_clock.py index 827cad5..45b809f 100644 --- a/worldtimezone/extensions/world_clock.py +++ b/worldtimezone/extensions/world_clock.py @@ -14,7 +14,7 @@ @plugin.command @lightbulb.add_cooldown(5, 1, lightbulb.UserBucket) @lightbulb.option( - "timezone", "Your TimeZone", type=str, required=False, choices=world_clock_data.COMMON_TIMEZONES + "timezone", "Your TimeZone", type=str, required=False, autocomplete=True ) @lightbulb.command("set", description="Set your TimeZone", pass_options=True) @lightbulb.implements(lightbulb.SlashCommand) @@ -28,6 +28,11 @@ async def setIt(ctx: lightbulb.SlashContext, timezone: Optional[str] = None) -> await ctx.respond("Your TimeZone as been set!") +@setIt.autocomplete("timezone") +async def setIt_autocomplete_timezone(opt, inter): + return world_clock_data.COMMON_TIMEZONES + + @lightbulb.add_checks(lightbulb.human_only) @plugin.command @lightbulb.add_cooldown(5, 1, lightbulb.UserBucket)