Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Discord.JS v14 #7

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

TehMartinXz
Copy link

Initial support for D.js v14 and improvements on the notifyOwner system.

TehMartinXz and others added 7 commits August 14, 2022 17:21
Further improvements to the notifyOwner system.

- Improved the notification message when running Administrator commands by adding an extra option to customize the notifyCommandMessage code.
- Add the notifyCommandMessage for notifications when an Administrator command is executed.

How it works:
If a command that requires Administrator permissions is executed, and the notifyOwner option is enabled, the notifyCommandMessage will be executed. However, if the notifyCommandMessage option is missing, the bot will simply send the default message which is set in /src/Command.js
The issue was that if for some reason, the permission at command.limits weren't exactly "administrator", then the notification wouldn't be sent. So now it supports both objects (For when using multiple permissions even though this system only works with Administrator) and toAnyCase strings.

And yes, I know that I used 2 ".toLowerCase" when I could've just made it .toUpperCase or make the "ADMINISTRATOR" string lowercase, but. I don't care :D, it's for memes
@LukeIsHereToDevelop
Copy link
Owner

Seems good! Will test it really soon and let you know

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