Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.0.rc3] Messages with quotes get truncated from Discord to Game #122

Open
trevorjd opened this issue Jan 1, 2022 · 3 comments
Open
Assignees
Labels

Comments

@trevorjd
Copy link

trevorjd commented Jan 1, 2022

Heyo, a fun new one! Discovered that messages "using quotes" mid-sentence when sending from Discord to game get truncated before the first quote mark. Example verified. Messages from game to Discord are not affected. Parentheses do not trigger the bug.

Trevor — Today at 9:43 PM
testing "this part in quotes might not go through" testing
TrevorBot — Today at 9:43 PM
Server: [Trevor] testing

Got a player in-game to send the same message. Came thru to Discord just fine.
charname: testing "this part in quotes might not go through" testing

@LakeYS LakeYS self-assigned this Jan 1, 2022
@LakeYS LakeYS added the bug label Jan 1, 2022
@LakeYS
Copy link
Owner

LakeYS commented Jan 1, 2022

I've replicated and identified the root cause, and it's messy. Adding quotes is breaking the syntax of the commands the bot sends to the game. The only current solution I'm finding is to remove quotes from messages.

I've applied this change immediately in 3108323, as I suspect that this could open up some other nasty issues.

This is obviously not an ideal fix. I'm looking into some ways that we might be able to work around it.

@trevorjd
Copy link
Author

trevorjd commented Jan 2, 2022

Just enough knowledge here to be dangerous but miss important fundamental concepts... at the risk of teaching you how to suck eggs, would it be possible / useful to treat the message internally as HTML so you can use something like & quot ; and similar tokens? Does Discord accept HTML strings?

(lol, github processed my html token and displayed a quote)

@LakeYS
Copy link
Owner

LakeYS commented Jan 2, 2022

Discord takes messages in the form of Markdown, i.e. the same as it's used here. Unfortunately, this will not work, as this issue falls in the hands of the game rather than Discord. (I.e. if you type a message with quotes into the game console, it will do the exact same thing that you've replicated in Discord)

My first attempt to fix this was to use an escape character('\'), which Discord and most common software recognizes. Unfortunately, 7 Days to Die does not, which doesn't leave us with many options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants