rogueworld icon indicating copy to clipboard operation
rogueworld copied to clipboard

discord bot, synchronize game global chat with discord global-chat channel

Open RagingPix3l opened this issue 3 years ago • 9 comments

Category

  • UI
  • Other - CHAT

Feature description

discord bot that would:

  • forward in-game global chat messages to '#global-chat' channel on discord
  • send messages that users with specific role on discord type in that channel to in-game global chat

Notes

In one of the games I used to play devs had similar integration with irc channel and it was very good way for them to keep an eye on game and help new players.

RagingPix3l avatar Apr 19 '21 17:04 RagingPix3l

I can do this one.

Simperfy avatar Apr 20 '21 05:04 Simperfy

you want to create discord bot and integrate it with game server? Or just some parts of this feature?

RagingPix3l avatar Apr 20 '21 11:04 RagingPix3l

lets just wait for @Arcanorum notes on this issue before you start with the implementation

RagingPix3l avatar Apr 20 '21 12:04 RagingPix3l

  • How would this look from a users perspective? Any GUI changes to the current in-game chat box?

  • Currently there are just 3 channels for the in-game chat, Local/Global/Trade. Would this be for only the "Global" global chat, or also include Trade (which is also broadcast globally). Would each one have their own receiving channels in Discord?

  • Would there need to be a way for a user (in Discord, or in game) to differentiate whether a message is sent by a Discord user, or an in-game user?

  • Where/when would this run? Would it be a separate process that can be started/stopped independently of the game server?

  • How would moderation work for if someone starts spamming global chat? Could an in-game user still be muted by a Discord moderator? Even if they are a guest account/have no account to add a mute timer to?

Arcanorum avatar Apr 20 '21 17:04 Arcanorum

* How would this look from a users perspective? Any GUI changes to the current in-game chat box?
  • Messages in game global channels should have {discordUserName} @ discord string included in the message text and maybe it should have different color?
* Currently there are just 3 channels for the in-game chat, Local/Global/Trade. Would this be for only the "Global" global chat, or also include Trade (which is also broadcast globally). Would each one have their own receiving channels in Discord?
  • all global channels should have their own channel on discord,
* Would there need to be a way for a user (in Discord, or in game) to differentiate whether a message is sent by a Discord user, or an in-game user?
  • in game users should be able to easily differentiate messages sent from discord or by player in game
* Where/when would this run? Would it be a separate process that can be started/stopped independently of the game server?
  • @Simperfy what are you planning to use for bot implementation? I was thinking about: https://github.com/Discord4J/Discord4J
* How would moderation work for if someone starts spamming global chat? Could an in-game user still be muted by a Discord moderator? Even if they are a guest account/have no account to add a mute timer to?
  • maybe show player id next to messages from guest account in discord channel so that guest account can be muted?

RagingPix3l avatar Apr 20 '21 18:04 RagingPix3l

@Simperfy what do you think about this questions?

RagingPix3l avatar Apr 20 '21 18:04 RagingPix3l

you want to create discord bot and integrate it with game server? Or just some parts of this feature?

I would like to integrate the whole thing (work with both + game server). I've done this before.

Simperfy avatar Apr 21 '21 11:04 Simperfy

  • How would this look from a users perspective? Any GUI changes to the current in-game chat box?

I was thinking of adding a discord icon somewhere in the chat line, when user hovers over the icon it would show a tooltip that says "This messages was forwarded to discord server". I was also thinking of an option in settings panel where you can turn off forwarding of Global messages to discord server.

  • Currently there are just 3 channels for the in-game chat, Local/Global/Trade. Would this be for only the "Global" global chat, or also include Trade (which is also broadcast globally). Would each one have their own receiving channels in Discord?

I think Global is enough, we don't want to make players that we are spoofing at all of their conversation. Also I think it's pretty hard to track 3 channels with a lot of players chatting. If they need help then we should inform players that they can chat in global chat and it would be forwarded to discord (which could be optionally turned off) so that other players can help them.

This approach would eliminate the need for us to forward local & trade channel because if they need help, they know they can chat in global channel.

  • Would there need to be a way for a user (in Discord, or in game) to differentiate whether a message is sent by a Discord user, or an in-game user?

Yes definitely, I think a discord icon with a tooltip "sent from discord" would do, along with the username.

I highly recommend restricting this feature to trusted moderators only, this can potentially be used for trolling.

Example: A discord user changed his username to Arcan and asks a player to give him an item in exchange for something.

  • Where/when would this run? Would it be a separate process that can be started/stopped independently of the game server?

I'm thinking of running the bot with the game server after it has been initialized. My plan is to add an optional flag that can disable/enable the bot, ie: npm run dev:server --bot. All of my previous discord bot implementation was done using discord.js.

  • How would moderation work for if someone starts spamming global chat? Could an in-game user still be muted by a Discord moderator? Even if they are a guest account/have no account to add a mute timer to?

I think this type of moderation should be moved to a separate issue, I think an in-game panel that can only be accessed by mods/admin where they can mute, ban, kick player should be done first. After that we extend this feature to the discord bot.

Simperfy avatar Apr 21 '21 11:04 Simperfy

I think Global is enough, we don't want to make players that we are spoofing at all of their conversation. Also I think it's pretty hard to track 3 channels with a lot of players chatting. If they need help then we should inform players that they can chat in global chat and it would be forwarded to discord (which could be optionally turned off) so that other players can help them.

This approach would eliminate the need for us to forward local & trade channel because if they need help, they know they can chat in global channel.

The point about Trade was not about players getting help, but just about trade. Player wants to sell/buy an item, they can see available offers from both in-game and Discord. i.e. you don't have to be actively in-game to see if there is something you have wanted to buy.

Yes definitely, I think a discord icon with a tooltip "sent from discord" would do, along with the username.

I highly recommend restricting this feature to trusted moderators only, this can potentially be used for trolling.

Example: A discord user changed his username to Arcan and asks a player to give him an item in exchange for something.

This is already the case for the game in general, as display names alone are not enough to say who someone is for sure. Some other differentiation will be needed, something like a crown icon next to name instead, so even they could change their username and everyone could still understand who is a mod/admin/whatever. As I could even change my own name to something other than "Arcan", the current name value for an account with higher permissions shouldn't matter.

Arcanorum avatar Apr 21 '21 15:04 Arcanorum