We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7226fff commit e6c9f1fCopy full SHA for e6c9f1f
1 file changed
src/extensions/dev.py
@@ -387,10 +387,16 @@ async def blacklist_cmd(
387
@arc.slash_command("resetsettings", "Reset all settings for the specified guild.")
388
async def resetsettings_cmd(
389
ctx: SnedContext,
390
- guild_id: arc.Option[int, arc.IntParams("The guild_id to reset all settings for.")],
+ guild_id: arc.Option[str, arc.IntParams("The guild_id to reset all settings for.")],
391
rp: ResponseProvider = arc.inject(),
392
) -> None:
393
- guild = ctx.client.cache.get_guild(guild_id)
+ 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)
400
401
if not guild:
402
await ctx.respond("❌ Guild not found.")
0 commit comments