fjaros / wowchat

WoWChat is a clientless Discord integration chat bot for old versions of World of Warcraft.
GNU General Public License v3.0
139 stars 96 forks source link

Suggestion regarding to moderation #100

Closed MrTide closed 1 year ago

MrTide commented 1 year ago

Hello once again, i am not sure this is the right place to ask but I can't believe how awesome wowchat is i am falling in love with it I wonder if you can add ingame moderation function to it as well, read a word and apply a command like gm commands or discord/gkick command and so on. Thank you in for taking the time and creating this master piece! It would be really nice if you consider. I have it on weakaura atm but it would be really nice

fjaros commented 1 year ago

Duplicate of #29 . The reasons listed in that issue are still relevant.

MrTide commented 1 year ago

Duplicate of #29 . The reasons listed in that issue are still relevant.

Thank you for taking a look, my suggestion was that maybe this bot could read a channel or say/yell chat ingame and apply a command to that player more like trigger (player X said the N-Word .kick playername or /kick from the channel) so basically it just writes something, i dont want it to send anything to the server, thanks for taking a look <3

fjaros commented 1 year ago

Ah I see, you're talking about Discord moderation from in-game. Either way, the access control would still have to be designed and implemented. You wouldn't want everyone who can talk to the bot having access to kick people from Discord. It's not a bad idea, but as this project is on maintenance mode, I don't plan on implementing such a large feature. And also, the workaround of just going to your Discord client and kicking that person out is quite sufficient.

MrTide commented 1 year ago

Ah I see, you're talking about Discord moderation from in-game. Either way, the access control would still have to be designed and implemented. You wouldn't want everyone who can talk to the bot having access to kick people from Discord. It's not a bad idea, but as this project is on maintenance mode, I don't plan on implementing such a large feature. And also, the workaround of just going to your Discord client and kicking that person out is quite sufficient.

not exactly i want it to read > catch and act on it by itself, we just enter banned words and the commands to use like .kick or /ckick or what ever. totally unrelated to discord permissions can be given ingame so that is not the issue Something like this but ofc in the config file image image ![Uploading image.png…]()

eitherway i love wowchat and it made my life so much easier thank you <3

fjaros commented 1 year ago

I see so in the end you do want wow in-game chat moderation... Sorry it is very unclear from your messages what you actually mean in the context of the functionality of the bot. This unfortunately will require some coding modifications. In the simplest form:

  1. You will have to setup a relay from that channel -> discord
  2. You can get inspired by implementation of filters - https://github.com/fjaros/wowchat/blob/master/src/main/scala/wowchat/discord/Discord.scala#L73
  3. You will have to implement a function like shouldFilter, let's call it "shouldModerate". Inside this function, you should decide what action to take based on the content of the message, channel it is sent in, and who sent it.
  4. If you decide an action is needed, you can then use the Global.game.foreach(_.sendMessageToWow()) construct to send the moderation command back to the game server. You can see this function being used to notify users of errors (such as for a failed @ tag notification).

Happy coding 😄