codewars / discord-bot

Codewars Discord Bot
MIT License
21 stars 11 forks source link

Migrating to slash commands #43

Closed DonaldKellett closed 2 years ago

DonaldKellett commented 2 years ago

First mentioned in https://github.com/codewars/discord-bot/issues/36#issuecomment-1024850848 , there are now concrete plans to migrate our bot to use slash commands in place of ad-hoc text-based commands in order to leverage features such as autocompletion, parameter and type checking; in fact, initial support for slash commands has been added in https://github.com/codewars/discord-bot/pull/41 , though the majority of text-based commands have yet to be migrated over.

This issue aims to list and keep track of the steps required to implement an incremental, smooth migration of our bot over to slash commands, minimizing impact on users in our Discord server. Feel free to suggest changes to the list below, and / or edit the list accordingly:

  1. [x] Remove support for COMMAND_PREFIX; update README accordingly
  2. [x] Update command and message-handler templates for new project structure
  3. [x] Implement /link command; remove ?link
  4. [x] Implement /introduce command; remove ?introduce
    1. [x] (Optional) Use new permissions mechanism to disable /introduce for unauthorized users
  5. [x] Implement /warn command; remove ?warn
  6. [x] Implement /rankup command; remove ?rankup
  7. [x] Remove legacy command support
  8. [ ] (Optional) Make slash command argument extraction fully declarative
kazk commented 2 years ago

Do you want to start by removing PREFIX and updating README to include how to get client/guild ids? I think what you had in #37 was good.

You can also add a link to the official docs for each.

https://github.com/codewars/discord-bot/blob/7c3083ba9eaa8e07a662beabff2eeeac36a59484/src/config.ts#L24-L25

DonaldKellett commented 2 years ago

Do you want to start by removing PREFIX and updating README to include how to get client/guild ids? I think what you had in #37 was good.

Sounds good to me. I'll open a PR shortly.

kazk commented 2 years ago

You can do ?link and ?rankup because those are for all users. Please open separate PRs. I gave you and @Kacarott "Triage" role so you should be able to request review from him for ?rankup.

DonaldKellett commented 2 years ago

Now that we've fully migrated to slash commands, maybe we should make an announcement on Discord?

kazk commented 2 years ago

Done