Xujiayao / Discord-MC-Chat

Discord-MC-Chat (DMCC), formerly known as MC-Discord-Chat and MCDiscordChat (MCDC), is a practical and powerful Fabric and Quilt Minecraft <> Discord chat bridge inspired by BRForgers/DisFabric
https://blog.xujiayao.com/posts/4ba0a17a/
MIT License
65 stars 36 forks source link

[Enhancement] ADMIN CHAT (aternative = private chat) #123

Open CherubicBoot opened 1 year ago

CherubicBoot commented 1 year ago

Checks

Description

ok, so long story short, my gf and I want to be able to discuss some personal stuff from discord to minecraft and we don't want anyone in the server (both discord and minecraft) to be able to see it, so my idea is to add another chat channel in the discord server that only me and my gf can see/send message, then any message that are sent to the private chat will be sent to players in minecraft that are registered as "admin" and not "regular player".

I was thinking something like this in the config file: admin-channel-id="(channel id)" ##admin channel ID on discord. admin-username="player1,player2,player3" ##minecraft admin username, who will receive messages from admin channel from discord.

Xujiayao commented 1 year ago

How can players distinguish between admin and public chat & specify which channel to send the message in the game?

CherubicBoot commented 1 year ago

How can players distinguish between admin and public chat & specify which channel to send the message in the game?

For in-game message (from Discord to Minecraft), how about tellraw {admin-username} {formatted/unformatted message}? Or alternatively, add those players within "admin username" in the config file with mcdc-admin tag, then use tellraw @a[tag=mcdc-admin] {formatted/unformatted message}.

And about which "discord channel", just put another discord channel-id for admin-chat channel in the config file. The users need to private the specified admin-chat channel using role permission for both players and the mcdc bot itself, so only those players and the mcdc bot can view and send message in the specified channel.

As for Minecraft to Discord, I was thinking an custom command for admin chat, just like a party-chat in servers. /mcdc chat (public or admin) : set individual default chat message to public/admin.

Or if we want to only send a message to public or admin without changing the default chat message, just add the message after "public or admin" in the in-game command. Example : /mcdc chat (public or admin) (message)

Also, I think seperating the custom message between public chat and admin chat is a good idea to distinguish public message with admin chat.

Xujiayao commented 1 year ago

I have other important things to do recently, so the resolution schedule for the issue will be delayed.

CherubicBoot commented 1 year ago

I have other important things to do recently, so the resolution schedule for the issue will be delayed.

It's okay!

CherubicBoot commented 1 year ago

Hi! It's been a while now, and I was wondering about the "status" of the feature I requested, is it still being develop or still waiting for a free time to develop it?

Xujiayao commented 1 year ago

Hi, I am working hard on a school project which will last until the end of May, so I am unavailable to develop larger-scale enhancements (such as this one) and can only deal with some bugs. Sorry!

CherubicBoot commented 1 year ago

Ahh alright then, goodluck on your school project!

Xujiayao commented 1 year ago

All right, finally approaches this issue.

So after re-reading the messages, I guess we could simplify this issue to "Admin Chat" instead of "Admin / Private Chat"?

Private Chat would mean direct messaging between two people, which would be much more complicated. Admin is just a channel, which is easier to implement.

CherubicBoot commented 1 year ago

All right, finally approaches this issue.

So after re-reading the messages, I guess we could simplify this issue to "Admin Chat" instead of "Admin / Private Chat"?

Private Chat would mean direct messaging between two people, which would be much more complicated. Admin is just a channel, which is easier to implement.

Alright. Also, is it possible to add multiple "admin" channel?

Xujiayao commented 1 year ago

? Why would there be two admin channels?

CherubicBoot commented 1 year ago

? Why would there be two admin channels?

image

1 of then are for sending coordinates from minecraft to discord and vice-versa, while the other one is for the actual admin-chat. This coordinate channel is not private though, so I think calling it "secondary channel" and "admin chat" is better.

Xujiayao commented 1 year ago

I think calling it "secondary channel" and "admin chat" is better.

Agree. However, my concern is whether a "secondary channel" is needed to link with Minecraft in-game players. In your case, the "secondary channel" is more like a channel for taking notes only but not real-time chatting.

CherubicBoot commented 1 year ago

I just realized something, is it possible to add an option to include/exclude messages from admin channel so that the messages from admin channel can be filtered from log channel so other ppl who has permission to view server log can't read the messages from admin channel? It will not be turned on by default and can be configured in config file, just like command broadcast.

CherubicBoot commented 1 year ago

Is there any updates regarding to this enhancement?

Xujiayao commented 1 year ago

Hi. I am currently very busy with my academics, which will last until May next year, so I cannot deal with all the current issues, but I will still try to take some time to work on MCDC. You can see from the current list that all that is left are either issues that I do not know how to resolve yet or very complicated issues.

Yes, I would like to inform you that this issue is very complicated from a coding perspective, as it requires many changes and additions to the current configuration file and code. Based on your description and the opinions of myself and the other collaborators, there will be more than two channels for sending and receiving messages in-game, and each channel has different view permissions, not limited to admin.

Screenshot for my later reference:

image

CherubicBoot commented 1 year ago

https://www.spigotmc.org/resources/discordsrv-staff-chat.44245/ Anyway, the enhancement I requested is pretty much the same like staff chat from DiscordSRV, just in case if this can help the development of this request

Xujiayao commented 1 year ago

Thanks for the helpful sample, but unfortunately, I don't have the time to deal with it. Please wait.

Additionally, I'd like to remind you of some GitHub etiquette before you potentially face criticism from others. Please refrain from saying "requested almost a year ago" again. The fact is, this issue was actually submitted only six and a half months ago, and it's common for issues to remain open for quite a long time on GitHub, and using such phrases is annoying to coders on the platform. Here are some screenshots taken from DiscordSRV:

image

image

CherubicBoot commented 1 year ago

Thanks for the helpful sample, but unfortunately, I don't have the time to deal with it. Please wait.

Additionally, I'd like to remind you of some GitHub etiquette before you potentially face criticism from others. Please refrain from saying "requested almost a year ago" again. The fact is, this issue was actually submitted only six and a half months ago, and it's common for issues to remain open for quite a long time on GitHub, and using such phrases is annoying to coders on the platform. Here are some screenshots taken from DiscordSRV:

image

image

I had 0 knowledge about GitHub and it was absolutely my bad, I'm really sorry about that, I won't repeat that again. Thank you so much for teaching me such a valuable lesson

transcental commented 1 year ago

There is a /team and /teamchat command in Minecraft. If the bot creates roles/channels for each team, perhaps this could be used for a private relay. Ideally, the bot could link MC usernames to discord ones, but a server admin could manually assign the role.

Just a suggestion on how to implement it that seems simpler than what's suggested here. https://github.com/Xujiayao/MCDiscordChat/issues/123#issuecomment-1442909528. It would also allow for many team chats which could be handy.

Xujiayao commented 1 year ago

There is a /team and /teamchat command in Minecraft. If the bot creates roles/channels for each team, perhaps this could be used for a private relay. Ideally, the bot could link MC usernames to discord ones, but a server admin could manually assign the role.

Just a suggestion on how to implement it that seems simpler than what's suggested here. #123 (comment). It would also allow for mqny team chats which could be handy.

Thank you for the suggestion!