chamburr / modmail

A feature-rich Discord bot for easy communication between server staff and users.
https://modmail.xyz
GNU Affero General Public License v3.0
338 stars 244 forks source link

Use slash commands, threads, components #113

Open chamburr opened 2 years ago

chamburr commented 2 years ago

With the launch of new Discord features, we should update ModMail to utilise them.

SnowyJaguar1034 commented 2 years ago

If You want a (relatively) quick way to add slash commands and components to the bot then I recommend discord-interctions.py whose GitHub, Docs and PyPi can be found with the aforementioned links. I personally use this library for my bot and it works great. It can be a bit clunky compared to the Discord.py forks such as Disnake , Pycord and Nextcord however discord-interactions is almost entirely decorator based to be more compatible with discord.py.

If you are more interested in rewriting the bot in a new library then Hikiri is looking like a good up and coming library for Python.

That all said I know you mentioned you were thinking of rewriting the entire bot in rust but just thought I'd throw my two cents out there.

chamburr commented 2 years ago

Thanks for the suggestions. I think that for the time being, none of the discord.py forks are mature enough to be used in production. I also feel that the Discord stuff are not quite polished yet, and due to time reasons, a rewrite is out of the picture for now. This is more of an issue for the long-term and I'll have to decide whether to switch to a fork or rewrite the bot later down the road.

SnowyJaguar1034 commented 2 years ago

Yeah I expected as much tbh which is why I threw in the discord-interactions.py links, could be a good stop-gap solution for the time being which won't necessarily require an entire rewrite (you could just call each command as a function from within a slash command function, I think). I defiantly think the context menus could be useful for the ticket creation process so ppl just right click on Modmails pfp, click apps, then create ticket

ForgottenHero commented 2 years ago

https://discord.com/blog/welcome-to-the-new-era-of-discord-apps This news post from Discord says:

  • For verified apps (bots that have a checkmark displayed), Slash Commands are the new standard for interacting with them. Huzzah!
  • For unverified apps (bots that don't have a checkmark), you may still be using text commands when you interact with them, depending on what the developer prefers.

September 1, 2022 is the final switchover date. This means that, if the developer of one of the apps you’re using has not made the switch yet, parts of the app might not work after that time.