-
Notifications
You must be signed in to change notification settings - Fork 99
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
base: main
Are you sure you want to change the base?
Conversation
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.
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 = { |
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.
Looks good for the most part, but it may be better to have these two hash maps defined in lib/discordrb/data/interaction.rb
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:
|
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! |
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.
Thanks!
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