fit-ctu-discord / honza-botner

Bot for FIT CTU Discord
https://discord.fit.cvut.cz/
MIT License
15 stars 10 forks source link

Pinning messages in threads #260

Open stepech opened 2 years ago

stepech commented 2 years ago

So, as I understand it, every thread has its own pinned messages tab. This creates awesome opportunity as we can pin messages somehow relevant to the topic of the thread. Imagine: Thread is focused on one topic, which is after 20 messages already answered, but the discussion continues, so anyone looking for the exact same answer later will have to scroll through the whole conversation. This is especially messy in longer threads, like "Opensource FIT" where it would really stand out.

My feature request: Give the author of the message on which was the thread created (careful - that is different from thread owner) ability to react on some other message in the thread and pin it inside thread. Furthermore - allow more people this management, under some additional conditions. Use cases: Mark some message as very important in the scope of topic solved by the thread.


How I imagine implementation:

  1. give teachers ability to have absolute power over pins in class channels - We already have config-defined group of channels for voice, thus managing voice lobby and so. I believe we can create config-defined list of channels which are subject/school related. In case a thread is created in such a group, all people with role teacher will have power to pin messages inside such threads.
  2. give author of the message absolute control over pins in his thread - not just class related channels, let anyone who is author of the first message in thread (That is either author of a message on which was thread created, or author of a thread in case of standalone threads) react on a message, thus pinning it.
  3. give some power to "regular" users - in case any message in any thread has over X specific reactions on it, pin it too. Accounting for cases when the original author is no longer part of thread or just doesn't know/properly use this feature
stepech commented 2 years ago

Will require DSharpPlus >= 4.2.0 as per this issue

stepech commented 2 years ago

Any ideas about implementation? As we switched to nightly, this is possible now.