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

@ and maybe other symbol escaping? #9

Closed
Keaft opened this issue Apr 7, 2016 · 8 comments
Closed

@ and maybe other symbol escaping? #9

Keaft opened this issue Apr 7, 2016 · 8 comments

Comments

@Keaft
Copy link

Keaft commented Apr 7, 2016

I tried to get my attention from minecraft in discord with "@Keaft" like a pleb and,

http://pastebin.com/ZGzdp0An

Could be a function of the differing regex I'm using?

It crashes and closes shulker.

@s-thom
Copy link
Contributor

s-thom commented Apr 8, 2016

That looks like an issue with discord.js. That stacktrace isn't giving me a lot to go on past that.


As a side note, Discord doesn't actually send @username, instead it sends <@userid> (and <#channelid> for channel mentions). It's the clients that then translate that and make it look like a user mention. You can see this if you do an @mention in Discord and see what happens in Minecraft.

If you want to @mention from Minecraft, you'll need a 'translator' that takes the @username and turns it into <@userid>

@Keaft
Copy link
Author

Keaft commented May 23, 2016

Turns out this also occurs when someone edits a message in discord. I was running it under forever, and yet it still hangs for some reason on occasion. Currently running it under forever appears to assuage the issue, but I thought I would let you know anyway.

http://pastebin.com/avK0pcie

@Keaft
Copy link
Author

Keaft commented May 24, 2016

So even forever doesn't seem to keep this up forever anymore.

http://pastebin.com/WsmRwxHk

I'm running: forever -e ./error.log start index.js
to capture the error log. You can see it manages to pull it back up from the same error over and over again, but for some reason unknown to me it eventually fails.

@destruc7i0n
Copy link
Owner

What are you doing on Discord throughout all these errors?

@Keaft
Copy link
Author

Keaft commented May 24, 2016

So as far as replicatable behaviors:
I can trigger the error everytime if I edit a message in discord after I post it.
It appears I can also trigger it if I post a youtube link inside of minecraft.
and if I try to mention in minecraft (@Keaft).

Other behaviors, which don't seem to effect it, include just straight up chatting on mc and discord and posting web links on discord.

Otherwise it seems to just happen over time.
Do you know of a way to add timestamps to the forever error log file?

Edit so I just checked the tail -f that reads out to your bot and I see:
Cannot POST /minecraft/hook
Over and over and over again.
I feel like this suggests I have it set up wrong?
tail -F ./Minecraft/logs/latest.log | grep --line-buffered ": <" | while read x ; do echo -ne $x | curl -X POST -d @- http://127.0.0.1:8000/minecraft/hook ; done

@destruc7i0n
Copy link
Owner

That seems to be the way the tail is supposed to work... I cannot seem to replicate this error myself :/

@Keaft
Copy link
Author

Keaft commented May 28, 2016

Is there a way I can get a more verbose error log. Maybe something that lists everything that is going on?

@destruc7i0n
Copy link
Owner

You can try enabling Debug in the config file.

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

No branches or pull requests

3 participants