khyperia / weechat-discord

Unmaintained! And also apparently this is against their TOS so DON'T USE THIS -- Weechat plugin for Discord support - https://weechat.org/ https://discordapp.com/
MIT License
51 stars 24 forks source link

Hide muted channels #16

Closed asdfffdsa closed 7 years ago

asdfffdsa commented 7 years ago

Most discord servers have a lot of channels and so when you join them with weechat your buffer list gets flooded and it becomes unmanageable. In the default Discord application you can mute channels and then hide them, getting rid of all of that clutter. It would be nice if one could hide muted channels in the same way.

khyperia commented 7 years ago

Thanks for the issue - I had no idea that people other than me and a friend were using this, so I apologize for not checking github issues for a long time.

I've been trying to think of a good way to support this - for my use case, there's a lot of channels that I have muted, but I still want to check occasionally (for example, a "bots" channel that's usually just botspam, but sometimes I get pinged there or moderator duties call me there, etc.). Do you have thoughts of a good way around that? Perhaps making /close being actually supported (instead of automatically re-opening), as well as /join (related to #17)

yfery commented 7 years ago

I'm also interested in this feature.

For the implementation, perhaps a building option (I don't think we need to switch between those two modes once the lib is built):

LIBWEECORD_DISABLE_MUTED_CHANNEL=1 cargo build --release 

And into the code:

const DISABLE_MUTED_CHANNEL: &'static str = env!("LIBWEECORD_DISABLE_MUTED_CHANNEL");
LovesTha commented 7 years ago

Yeah a run time toggle of seeing the muted channels would be awesome, and /leave should probably just mute the channel?

LovesTha commented 7 years ago

Sorry I was reading yfery the wrong way: I think it would be important to be able to switch between seeing muted channels and not.

FredrIQ commented 7 years ago

My usecase is somewhat similar to khyperia. I never mute channels in Discord proper since I don't want to miss anything actually important mentioned but with how Weechat handles buffers, I think it would be useful if you could "deattach" channels (or entire communities in rare cases) but be able to open them (and not miss out on backlog) if you're highlighted, or just on command.

This was one thing I missed in discordIRCd -- it will tell you when you are highlighted in channels you haven't "joined", but you wont get any backlog after joining.

khyperia commented 7 years ago

I have unpushed code on my laptop right now, hopefully I can clean it up and push it soon. The behavior I have implemented right now is:

I'll also eventually add more user-friendliness to this (e.g. /discord (un)mute channel_name will pipe through to that setting), but that's the core functionality.

I didn't think of the "ping even if it's not open" - that's a really good idea, can't believe I forgot to make sure that works! Additionally, I got a feature request elsewhere (not on Github) to make backlogs functional again, so I'll be working on that (I'll likely add a /discord backlog <n> to load n more lines of backlog, and perhaps defaulting to 50 or something when the buffer is opened)

Let me know if you think the mute.* functionality is a terrible idea 😛, otherwise I'll clean up and push that soon!

LovesTha commented 7 years ago

\<id> is a pretty terrible choice for the value, \<servername>.\<channelname> would at least be possible to interact with.

khyperia commented 7 years ago

Server names and channel names are not constant, and can change at any time (and do change, sometimes rapidly, in some servers). The original reason I wrote this plugin is to be able to use IDs instead of names (like IRC bridges do).

However, your feedback is noted - see the example of the /discord (un)mute command in my comment before yours 😊