Exiled-Team / DiscordIntegration

GNU General Public License v3.0
13 stars 36 forks source link

Displaying errors when user is using the Discord-version of SCP: SL #16

Closed sinsa92 closed 4 years ago

sinsa92 commented 4 years ago

The bot will sometimes not display the logs correctly if the User is using the Discord version of SCP: SL. For Example:

Discord-User: grafik

Steam-User: grafik

joker-119 commented 4 years ago

Blame the base game for using # as the separator for ra messages, instead of 2 separate strings, and for including the #xxxx numbers of people's discord Id's in their name for some reason. This likely can't be fixed without a rewrite of the ra message handler by nw, since that is what the plugin has to use in order to transmit messages to the bot for both events and command responses.

sinsa92 commented 4 years ago

Wouldn't it be possible to fetch the user by the discord id and then get the Tag (Name#Discriminator) via that? I think most discord libraries do that.

joker-119 commented 4 years ago

That isn't the issue, the issue is that the server itself contains the '#' symbol, which the game considers to be the splitter symbol for RA messages.

Source#Message

When multiple #'s are in the string, it uses the last one as the seperator. So

Plugin#1234567890#12345 has killed someone gets turned into 12345 has killed someone by SCP:SL. I'll have to re-write the entire way the plugin communicates to the bot in order to fix that.