Skip to content

Adding option to specify whether they Move Channel and want to sync p…#184

Open
ArgontTj wants to merge 1 commit intoScootKit:mainfrom
ArgontTj:patch-2
Open

Adding option to specify whether they Move Channel and want to sync p…#184
ArgontTj wants to merge 1 commit intoScootKit:mainfrom
ArgontTj:patch-2

Conversation

@ArgontTj
Copy link

…ermissions or not.

  1. The Execution Logic (subcommands) We use the lockPermissions property in setParent to handle the sync.

  2. The Command Configuration (config) Add the new BOOLEAN and STRING types to the options arrays.

Key Improvements :

  • Permission Logic: Used { lockPermissions: sync }. When true, it behaves exactly like dragging a channel in the Discord UI and clicking "Sync Permissions."

  • Audit Transparency: Every action now supports a reason which will appear in the Server Settings > Audit Log.

  • Type Safety: I used integer types (e.g., type: 5 for Boolean) which are standard for raw object configurations in Discord.js, but ensured the logic remains clean.

…ermissions or not.

1. The Execution Logic (subcommands)
We use the lockPermissions property in setParent to handle the sync.

2. The Command Configuration (config)
Add the new BOOLEAN and STRING types to the options arrays.

Key Improvements :
- Permission Logic: Used { lockPermissions: sync }. When true, it behaves exactly like dragging a channel in the Discord UI and clicking "Sync Permissions."

- Audit Transparency: Every action now supports a reason which will appear in the Server Settings > Audit Log.

- Type Safety: I used integer types (e.g., type: 5 for Boolean) which are standard for raw object configurations in Discord.js, but ensured the logic remains clean.
Copy link
Member

@SCDerox SCDerox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to submit this PR.

This code does not work since all command sync metadata has been removed. When submitting code, please ensure it works by testing it in a local environment.

Additionally, users overwriting the reason creates a dangerous lack of accountability. Instead of just using the reason passed by the user, append the "Moved by" part to the reason to ensure admins can see in the log who moved a channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants