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

Discord.js upgrade #59

Merged
merged 82 commits into from
Oct 29, 2023
Merged

Discord.js upgrade #59

merged 82 commits into from
Oct 29, 2023

Conversation

nmoschkin
Copy link
Contributor

Refactored to use the upgraded Discord.js libs.

@nmoschkin nmoschkin requested a review from silasary October 7, 2023 01:15
@nmoschkin nmoschkin marked this pull request as draft October 7, 2023 01:15
if (message instanceof CommandInteraction) {
if (message.guild && !message.guild.roles.everyone.permissionsIn(message.channel! as NonThreadGuildBasedChannel).has('UseExternalEmojis')) {
if (message instanceof CommandInteraction) {
if (message.guild && (!message.guild.roles.everyone.permissionsIn(message.channel! as NonThreadGuildBasedChannel).has('UseExternalEmojis') || !message.guild?.members.me?.premiumSince)) {
Copy link
Contributor

@silasary silasary Oct 9, 2023

Choose a reason for hiding this comment

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

Bots implicitly have a nitro-like ability to use external emoji, but technically don't have nitro. This check will break things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the only way that I could get emojis to show up. It would appear that the bot does not have those permissions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will double back and look at permissions to confirm. But I have the external emojis on, in my server...

@nmoschkin nmoschkin marked this pull request as ready for review October 29, 2023 02:47
@nmoschkin nmoschkin requested a review from silasary October 29, 2023 02:48
Copy link
Contributor

@silasary silasary left a comment

Choose a reason for hiding this comment

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

Ship it 😁

@nmoschkin nmoschkin merged commit 1a148c2 into master Oct 29, 2023
1 check passed
@nmoschkin nmoschkin deleted the discord.js-upgrade branch October 29, 2023 19:51
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