-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
to enable slash commands
src/utils/discord.ts
Outdated
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)) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
Covering github bugs: discord/discord-api-docs#5524 discord/discord-api-docs#5279 This seems to apply only to new connections. Older server connections that are already wired up do not have this issue.
Rehabilitating event reporting tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it 😁
Refactored to use the upgraded Discord.js libs.