Skip to content

Commit e6c9f1f

Browse files
committed
Fix resetsettings parameter being the wrong type
1 parent 7226fff commit e6c9f1f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/extensions/dev.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,16 @@ async def blacklist_cmd(
387387
@arc.slash_command("resetsettings", "Reset all settings for the specified guild.")
388388
async def resetsettings_cmd(
389389
ctx: SnedContext,
390-
guild_id: arc.Option[int, arc.IntParams("The guild_id to reset all settings for.")],
390+
guild_id: arc.Option[str, arc.IntParams("The guild_id to reset all settings for.")],
391391
rp: ResponseProvider = arc.inject(),
392392
) -> None:
393-
guild = ctx.client.cache.get_guild(guild_id)
393+
try:
394+
guild_id_int = int(guild_id)
395+
except ValueError:
396+
await ctx.respond("❌ Invalid guild ID.")
397+
return
398+
399+
guild = ctx.client.cache.get_guild(guild_id_int)
394400

395401
if not guild:
396402
await ctx.respond("❌ Guild not found.")

0 commit comments

Comments
 (0)