File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
interactions/commands/chatInput Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ enum InteractionOrRequestFinalStatus {
2727 NO_PERMISSION_TO_REMOVE ,
2828 TAG_NOT_FOUND ,
2929 NO_PERMISSIONS_PRESET_SELECTED ,
30- MANAGE_CONFIG_PERMISSION_CANNOT_BE_SET_ON_CHANNEL_LEVEL ,
30+ MANAGEMENT_PERMISSIONS_CANNOT_BE_SET_ON_CHANNEL_LEVEL ,
3131 GENERIC_EXPECTED_PERMISSIONS_FAILURE = 3000 ,
3232 USER_MISSING_DISCORD_PERMISSION ,
3333 BOT_MISSING_DISCORD_PERMISSION ,
Original file line number Diff line number Diff line change @@ -395,6 +395,13 @@ async function handlePermissionsQuickstartSubcommand({
395395 ) ;
396396 }
397397
398+ if ( managementPreset && channel === undefined ) {
399+ throw new ExpectedFailure (
400+ InteractionOrRequestFinalStatus . MANAGEMENT_PERMISSIONS_CANNOT_BE_SET_ON_CHANNEL_LEVEL ,
401+ "The management preset can only be set on guild level - leave as false to set message access"
402+ ) ;
403+ }
404+
398405 let permissions : number [ ] = [ ] ;
399406 if ( messagePreset ) {
400407 permissions = [
You can’t perform that action at this time.
0 commit comments