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

Implement Slash Commands #29

Merged
merged 5 commits into from
Sep 2, 2022

Conversation

bscotty
Copy link
Contributor

@bscotty bscotty commented Sep 1, 2022

  • add interaction type in command declarations
  • codify args for those that were not specified
  • access args properly once codified (via args property in run method)
  • update activity to no longer specify brackets
  • reply to /dm-me command both where it is used and via dms
    • note that slash commands cannot be used in dms, but the same commands as before can be. rather than registering slash commands globally (which includes dms), register them by the guilds that the bot has been added to, both on login and when added to a new guild
  • modify the search command as it can no longer support multiple queries in a single message
  • modify the search command as it can no longer reply to a slash command message multiple times (e.g., to support apocalypse rail)
  • trim descriptions that are long enough to crash discord api
  • register slash commands globally only after login

add interaction type in command declarations
codify args for those that were not specified
access args properly once codified
update activity to no longer specify brackets
reply to /dm-me command both where it is used and via dms
modify the search command as it can no longer support multiple queries in a single message
modify the search command as it can no longer reply to a slash command message multiple times (e.g., to support apocalypse rail)
trim descriptions that are long enough to crash discord api
register slash commands globally only after login
prevent use of slash commands in dms
rather than registering slash commands globally (which includes dms),
 register them by the guilds that the bot has been added to, both on
 login and when added to a new guild
commands are still registered to the bot as normal message-based
 commands and can be called safely in DMs so long as the /dm-me command
 is run in a server channel first
reset guildOnly properties to their original values
add unique handling for search since it is the only command that doesn't
 work the same way when called from a slash command and via a message
registering application commands can be rate limited on startup for
 cached guilds without waiting for the previous call to finish
this avoids requiring the application.commands scope (and therefore
 updating all permissions of the main uncle bot instance), while also
 only requiring a single request on launch.
@Piezoelectric
Copy link
Collaborator

here we go 🤞

@Piezoelectric Piezoelectric merged commit 073197a into aritsune:master Sep 2, 2022
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.

None yet

2 participants