modmailbot icon indicating copy to clipboard operation
modmailbot copied to clipboard

Reaction-based fast control bar

Open BadCoder1337 opened this issue 6 years ago • 6 comments
trafficstars

  1. 🕓 Close thread in 30 minutes
  2. 🔒 Suspend thread
  3. 🆔 Print user ID
  4. 📰 Print log links
  5. Reply with 1 snippet
  6. Reply with 2 snippet and etc. image This is not final structure of control bar. It's just concept. It would be great if a simple bar, implemented with 1-2 buttons out-of-box, could be extended by anyone with new Plugin API.

BadCoder1337 avatar Aug 07 '19 21:08 BadCoder1337

Reactions do not always show in the same order, and don't always show reliably (we use zira for roles and half the tickets are people that don't read where it says to refresh the page if the reactions don't show.)

This would be a pretty extensive rework, and I'm not sure it adds sufficient utility to justify it. v / r Robert Klebes Mobile: 571-492-8639 https://keybase.io/sporkwitch https://www.linkedin.com/in/klebes

On August 7, 2019 5:23:33 PM EDT, BadCoder1337 [email protected] wrote:

  1. 🕓 Close thread in 30 minutes>
  2. 🔒 Suspend thread>
  3. 🆔 Print user ID>
  4. 📰 Print log links>
  5. Reply with 1 snippet>
  6. Reply with 2 snippet> and etc.> image> This is not final structure of control bar. It's just concept.> It would be great if a simple bar, implemented with 1-2 buttons out-of-box, could be extended by anyone with new Plugin API.>

-- > You are receiving this because you are subscribed to this thread.> Reply to this email directly or view it on GitHub:> https://github.com/Dragory/modmailbot/issues/332

sporkwitch avatar Aug 07 '19 21:08 sporkwitch

Reactions do not always show in the same order

We can use await or make a then chain to have the reactions added in the correct order (if one of them fails, maybe stop adding the rest), but i don't think this would be worth adding.

reboxer avatar Aug 07 '19 22:08 reboxer

Even if you do, simply refreshing the screen can reorder them. It's not possible to enforce an order v / r Robert Klebes Mobile: 571-492-8639 https://keybase.io/sporkwitch https://www.linkedin.com/in/klebes

On August 7, 2019 6:14:26 PM EDT, reboxer [email protected] wrote:

Reactions do not always show in the same order We can use await or make a then chain to have the reactions added in the correct order (if one of them fails, maybe stop adding the rest), but i don't think this would be worth adding.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/Dragory/modmailbot/issues/332#issuecomment-519288309

sporkwitch avatar Aug 07 '19 22:08 sporkwitch

IMHO.

  • The order of reactions isn't a problem unlike the order of reaction-buttons in some music bots.

  • In my practice reordering & vanishing appears only on 13-15k same reactions.

  • Control bar doesn't require massive rework, just add some events emitters, properties & methods to plugin context.

Example:

module.exports = function(bot, knex, config, client) {
  const trackedControlBars = new Map();
  rehydrateControlBars(client.threads); // if bot has been restarted
  bot.on('messageReactionAdd', e => {
     const thread = trackedControlBars.get(e.message.id)
     e.emoji.name === '❌' ? thread.close() : otherStuff(e);
  })
  client.on('new_thread', createControlBar)
  client.on('close_thread', destroyControlBar)
}

BadCoder1337 avatar Aug 07 '19 23:08 BadCoder1337

Great idea. This would be helpful for me. Please add it.

ANONYM-ANONYM avatar Oct 29 '20 19:10 ANONYM-ANONYM

Button Interactions already here. It's a nice alternative for frequently used commands.

BadCoder1337 avatar Jun 23 '21 13:06 BadCoder1337