Qyriad / Seance

A ritual to channel the unseen
MIT License
11 stars 4 forks source link

Integrate Discord interactions and slash commands into Séance #10

Open AksanDotDev opened 2 years ago

AksanDotDev commented 2 years ago

So, discussed, elsewhere but not here, the v6 and v7 API decommission was pushed back to 2023 from earlier this year means the current version of Seance will be running for a good while yet, however there is still that impending sunset to consider.

Additionally, the 2.0 version of the discord.py API includes new features like bots sending stickers, and slash based commands (these could useful for more elegant config/message editing), which are worth investigating.

I'd be more than happy to explore an API update and new features, but wanted to reach out here and ask if there were any existing plans that I could contribute to, or a joint effort might be, a thing? Basically wanted to open the topic for discussion!

Qyriad commented 2 years ago

Hi there, sorry for the late reply. We're absolutely planning on migrating Séance to modern Discord API and Discord.py versions. A bare migration should be happening shortly, but as for using the more advanced features, there are some things to work out. Interactions could provide an excellent way to implement message editing and such, but for any server with more than one Séance bot added, each bot would then add its own version of the commands, causing lots of visually-duplicate commands.

I'm not sure how to work around this besides implementing a some sort of standalone daemon bot that globally handles slash commands and then forwards them to the appropriate Séance bots, but that sounds incredibly messy. Suggestions are definitely welcome for a cleaner solution.

AksanDotDev commented 2 years ago

So, my thought here isn't strictly one solved on the Seance bot side, but server integration configuration now allows you to limit access to slash commands to given roles. This could be used similarly to the current --ref-user-id argument to limit access to the slash commands and prevent this command collision. Of course this could still lead to mess for anyone handling multiple instances themselves, but I would say it can remove some degree of mess.

The other part would be to simply return to the --prefix style solution and have the bots bind their slash commands with a prefix. It might not stop the overall clutter problem, but could mean in a few character you can filter down to the slash commands on the intended bot.

Both would probably need some practical testing however. On a more general note I will be trying to put some more time into code soon if stuff stops being added to my plate so if the opportunity to contribute arises I'd be interested.