mathbot icon indicating copy to clipboard operation
mathbot copied to clipboard

Message Content Access Deprecation for Verified Bots

Open DXsmiley opened this issue 4 years ago • 10 comments

Discord will be deprecating message content access for verified bots (this includes MathBot) in April 2022.

I will be applying for the message content privilege, however this isn't guaranteed.

This means that mathbot should move to slash commands.

Most commands should be fairly straightforward to convert once we've figured out a good way to do it, however there's a number of commands which could prove much more difficult.

LaTeX commends

  • [ ] Basic responses (=tex command)
  • [ ] Update output when message is edited
  • [ ] Delete output with 🗑️ reaction
  • [ ] "MathBot is typing" notification, since the command can run for a while.
  • [ ] Variants including texw and texp.

Note that without the message content privilege, inline LaTeX will be entirely broken. If Discord denies me there'll basically be nothing I can do about it, since I don't see a way to convert that to a slash command in a meaningful manner. If this happens, I'll update the bot to give a deprecation warning alongside any output from inline tex commands.

Wolfram Alpha

  • [ ] Basic command functionality (=wolf command)
  • [ ] Re-running commands with assumptions
  • [ ] "MathBot is typing" notification, since the command can run for a while.
  • [ ] Pup command

Calc Command

  • [ ] Should be mostly fine, but we might loose the == shortcut and have to pick something else.

Settings

  • [ ] Internals of how the settings commands work will probably have to change a lot.

DXsmiley avatar Aug 01 '21 05:08 DXsmiley

Damn this sucks. Especially for inline latex. I can imagine this is a disaster for any auto moderator bots. 😳

On Sun, Aug 1, 2021, 07:03 Declan @.***> wrote:

Discord will be deprecating message content access for verified bots https://support-dev.discord.com/hc/en-us/articles/4404772028055 (this includes MathBot) in April 2022.

I will be applying for the message content privilege, however this isn't guaranteed.

This means that mathbot should move to slash commands.

Most commands should be fairly straightforward to convert once we've figured out a good way to do it, however there's a number of commands which could prove much more difficult. LaTeX commends

  • Basic responses (=tex command)
  • Update output when message is edited
  • Delete output with 🗑️ reaction
  • "MathBot is typing" notification, since the command can run for a while.
  • Variants including texw and texp.

Note that without the message content privilege, inline LaTeX will be entirely broken. If Discord denies me there'll basically be nothing I can do about it, since I don't see a way to convert that to a slash command in a meaningful manner. If this happens, I'll update the bot to give a deprecation warning alongside any output from inline tex commands. Wolfram Alpha

  • Basic command functionality (=wolf command)
  • Re-running commands with assumptions
  • "MathBot is typing" notification, since the command can run for a while.
  • Pup command

Calc Command

  • Should be mostly fine, but we might loose the == shortcut and have to pick something else.

Settings

  • Internals of how the settings commands work will probably have to change a lot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DXsmiley/mathbot/issues/100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV7G6DP57BZ52MRFGKCEG3T2TITFANCNFSM5BKXPRHQ .

Ytrog avatar Aug 02 '21 06:08 Ytrog

Nah, they specifically say that moderation bots should be fine.

From the annoucement:

We know that many bots and apps function specifically to read, moderate, and otherwise manage messages sent by Discord users. We expect to grant those requests for message content without issue. If your bot has unique functionality that cannot be replicated or otherwise implemented with interactions, you can begin applying once we open the queue for this intent in fall of 2021.

I'm hoping that MathBot can classify under "unique functionality", but I don't want to put all my eggs in that basket.

DXsmiley avatar Aug 02 '21 06:08 DXsmiley

I hope so too.

On Mon, Aug 2, 2021, 08:50 Declan @.***> wrote:

Nah, they specifically say that moderation bots should be fine.

From the annoucement https://support-dev.discord.com/hc/en-us/articles/4404772028055:

We know that many bots and apps function specifically to read, moderate, and otherwise manage messages sent by Discord users. We expect to grant those requests for message content without issue. If your bot has unique functionality that cannot be replicated or otherwise implemented with interactions, you can begin applying once we open the queue for this intent in fall of 2021.

I'm hoping that MathBot can classify under "unique functionality", but I don't want to put all my eggs in that basket.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DXsmiley/mathbot/issues/100#issuecomment-890768866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV7G6BSDX45M6GMXAQKF63T2Y535ANCNFSM5BKXPRHQ .

Ytrog avatar Aug 02 '21 06:08 Ytrog

How will the deprecation of discord.py affect this?

tweirtx avatar Aug 28 '21 02:08 tweirtx

How will the deprecation of discord.py affect this?

Thanks for bringing this to my attention. That's a pretty bad sign and I'm not really sure what the full implications will be. This might mean that a major rewrite of MathBot is required, unfortunately.

(for anyone else reading this you can find details of the discord.py situation here)

DXsmiley avatar Aug 28 '21 08:08 DXsmiley

All bots will still be able to see messages they are pinged in, so even if message intents are denied for MathBot, you will still be able to do stuff like:

@MathBot tex \sqrt{x^2}

That being said, Discord does want developers to switch over to slash commands and other interactions wherever possible.

It will require choosing a library (either a 3rd-party addon like discord-interactions or a fork such as nextcord, pycord, or edpy). Then each command will need decorators that specify what types each input to the command should accept. The forks are still currently in development, so it's best to wait before switching to one I think.

DenverCoder1 avatar Sep 10 '21 13:09 DenverCoder1

I am curious if you're planning to bump the targeted Python version as well, as 3.6 becomes End Of Life in a few months.

tweirtx avatar Oct 11 '21 22:10 tweirtx

Just wanted to check if there was any update on this

tweirtx avatar Dec 03 '21 19:12 tweirtx

I'm currently looking at discord-interactions as the library of choice going forward. Version 4.0 of the library is dropping on December 15th. It's a major rework of the library, so I'll be targeting that version rather than starting now and then having to convert (might start development working off their dev branch before that though).

I'll also bump to python 3.8 (or newer).

DXsmiley avatar Dec 04 '21 03:12 DXsmiley

Update here: discord.py is back. See this gist.

Ahsoka avatar Mar 16 '22 08:03 Ahsoka