File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -644,7 +644,7 @@ async def sync_commands(
644
644
}
645
645
)
646
646
else :
647
- print (
647
+ raise RuntimeError (
648
648
"No Role ID found in Guild ({guild_id}) for Role ({role})" .format (
649
649
guild_id = guild_id , role = permission ["id" ]
650
650
)
@@ -677,9 +677,8 @@ async def sync_commands(
677
677
678
678
# Make sure we don't have over 10 overwrites
679
679
if len (new_cmd_perm ["permissions" ]) > 10 :
680
- print (
681
- "Command '{name}' has more than 10 permission overrides in guild ({guild_id}).\n will only use "
682
- "the first 10 permission overrides." .format (
680
+ raise RuntimeError (
681
+ "Command '{name}' has more than 10 permission overrides in guild ({guild_id})." .format (
683
682
name = self ._application_commands [new_cmd_perm ["id" ]].name ,
684
683
guild_id = guild_id ,
685
684
)
@@ -695,7 +694,7 @@ async def sync_commands(
695
694
self .user .id , guild_id , guild_cmd_perms
696
695
)
697
696
except Forbidden :
698
- print (
697
+ raise RuntimeError (
699
698
f"Failed to add command permissions to guild { guild_id } " ,
700
699
file = sys .stderr ,
701
700
)
You can’t perform that action at this time.
0 commit comments