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 method for fetching all application commands #110

Merged
merged 3 commits into from
Dec 1, 2021

Conversation

TeeSeal
Copy link
Contributor

@TeeSeal TeeSeal commented Dec 1, 2021

Summary

Added public method for fetching all application commands.

# Fetch global application commands
bot.get_application_commands # => Array<ApplicationCommand>

# Fetch guild application commands
bot.get_application_commands(server_id: SAMPLE_SERVER_ID) # => Array<ApplicationCommand>

Added

  • Discordrb::Bot#get_application_commands

@swarley
Copy link
Member

swarley commented Dec 1, 2021

Hey, thanks for this! Just one small request, could you also add a return type annotation ([Array<ApplicationCommand>])? Otherwise lgtm.

@swarley swarley merged commit d238f6f into shardlab:main Dec 1, 2021
@TeeSeal
Copy link
Contributor Author

TeeSeal commented Dec 1, 2021

@swarley done. I kind of just copied the yard docs from #get_application_command which didn't have one either 😅

@swarley
Copy link
Member

swarley commented Dec 1, 2021

Thanks! 🚀

@TeeSeal TeeSeal deleted the application-commands branch December 1, 2021 23:18
@Daniel-Worrall Daniel-Worrall added enhancement New feature or request interactions Deals with interactions or slash commands labels Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request interactions Deals with interactions or slash commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants