Guide Revision Suggestions #593
Answered
by
Danktuary
JavascriptLearner815
asked this question in
Ideas
-
...and more to be possibly bethought of. I know some (or a lot) of these won't be added into the guide, but, obviously, that isn't everything, and plus, I want to see any thoughts or even additional revisions. Of course, discussing tweaks just makes the suggestions better! (The CAPITALIZED PRIORITIES are somewhat just for show.) Suggested Code to be Added to the Guide (Tweak These)if (command.permissions) {
const authorPerms = message.channel.permissionsFor(message.author);
if (!authorPerms) return message.reply('you cannot do this!');
for (const permission of command.permissions) {
if (!authorPerms.has(permission)) return message.reply('you cannot do this!');
}
const myPerms = message.channel.permissionsFor(message.client.user);
for (const permission of command.permissions) {
if (!myPerms.has(permission)) return message.reply('*I* cannot do this myself!');
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
Danktuary
Feb 23, 2021
Replies: 1 comment 2 replies
-
Thanks for the suggestions. 😄 I'll take care of these as I see fit. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
almostSouji
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the suggestions. 😄 I'll take care of these as I see fit.