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

Add support for Application Integration Types and Interaction Context Types #269

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

Conversation

EinTim23
Copy link

Summary

Add support for Application Integration Types and Interaction Context Types to allow registration of commands for chats outside guilds and the bots direct messages

@EinTim23 EinTim23 changed the title added support for commands in dm chats Add support for Application Integration Types and Interaction Context Types Aug 17, 2024
Copy link
Contributor

@Droid00000 Droid00000 left a comment

Choose a reason for hiding this comment

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

Mainly looks good, just need to run Rubocop and re-locate that hash map to lib/discordrb/data/interaction.rb.

lib/discordrb.rb Outdated
@@ -35,6 +35,18 @@ module Discordrb
direct_message_typing: 1 << 14
}.freeze


COMMAND_CONTEXTS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good for the most part, but it may be better to have these two hash maps defined in lib/discordrb/data/interaction.rb

@EinTim23
Copy link
Author

Should be resolved now, im not entirely sure about the last two offenses, as I never touched those files and there seem to be merge conflicts as contexts are apparently partially implemented by now.

@Droid00000
Copy link
Contributor

Droid00000 commented Oct 17, 2024

Should be resolved now, im not entirely sure about the last two offenses, as I never touched those files and there seem to be merge conflicts as contexts are apparently partially implemented by now.

Thanks so far! Those Rubocop warnings have been fixed in master. If you want you can re-base the branch and still include integration types even though contexts have already been added. 🙂

Oh, and I meant to mention this originally, but could you document the integration types field as well, if it’s not too much trouble?

Something along the lines of:

# @param integration_types [Array<Integer>] Supported integration types

@EinTim23
Copy link
Author

Alright, I rebased to the current commit on main. I couldn't really figure out where I'm supposed to document the parameter tho.

@Droid00000
Copy link
Contributor

Alright, I rebased to the current commit on main. I couldn't really figure out where I'm supposed to document the parameter tho.

Oh, Nevermind. I think it’s fine without the docs. Thanks!

Copy link
Contributor

@Droid00000 Droid00000 left a comment

Choose a reason for hiding this comment

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

Thanks!

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