Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Conversation

@Fierythunder
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged, as well as any and all proof of successful tests:

Semantic versioning classification:

  • This PR changes the framework's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to README, etc.
@YorkAARGH
Copy link
Member

Any screenshots or something to corroborate this working?

check: (message) => {
const serverOwner = message.author ?? message.user;
return message.channel.type === "GUILD_TEXT" ? (message.guild.ownerId === serverOwner.id ? true : false) : false;
return (message.channel.type === "GUILD_TEXT" || message.channel.isThread()) ? (message.guild.ownerId === serverOwner.id ? true : false) : false;
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work in news channels and is frankly over-engineered. Try this:

Suggested change
return (message.channel.type === "GUILD_TEXT" || message.channel.isThread()) ? (message.guild.ownerId === serverOwner.id ? true : false) : false;
return message.guild?.ownerId === serverOwner.id;
YorkAARGH added a commit that referenced this pull request Sep 13, 2021
This resolves #153, instead of over-engineering the issue it was successfully reduced to this thanks to @WilsontheWolf
@YorkAARGH
Copy link
Member

This was fixed in the most recent commit thanks to a simplistic suggestion from @WilsontheWolf

@YorkAARGH YorkAARGH closed this Sep 13, 2021
YorkAARGH added a commit that referenced this pull request Sep 25, 2021
* Slash Command Permissions. Due to the current limitations of the permission system for slash commands we essentially extend the functionality of our permission checking system to the slash commands. * Fixed a mistake. Forgot to revert testing parameters. Updated the comments in the deploy command. * Fixed Help Fixed the help command, it will now respond if you supply an invalid command name, or alias. It will now display the help message if an alias is supplied. Updated the `messageCreate` event to output the error into the console. Updated the example config to take advantage of the Nullish coalescing operator * Guild Owner fix This resolves #153, instead of over-engineering the issue it was successfully reduced to this thanks to @WilsontheWolf * Correcting a mistake. If the command executioner can, or can't execute the command with the nature of the permission system we **must** respond otherwise it will error out and inform the user that it failed, giving them the illusion that they can use the command.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants