Giter Club home page Giter Club logo

Comments (8)

Tholleman avatar Tholleman commented on September 13, 2024 1

That fixed it, thank you so much! Could you add that to the README.md?

from shulker.

destruc7i0n avatar destruc7i0n commented on September 13, 2024

The messages in MC relies on RCON, which requires a port to use. In the Minecraft log does it mention an RCON connection?

from shulker.

renshi2 avatar renshi2 commented on September 13, 2024

Yes, it does mention an rcon connection. I have now also tried re-installing it, but without success

from shulker.

destruc7i0n avatar destruc7i0n commented on September 13, 2024

Can you try a tool like this to see if you are able to connect to the rcon server MC provides? https://bukkit.org/threads/admin-rcon-mcrcon-remote-connection-client-for-minecraft-servers.70910/

Also, have you tried enabling debug mode ("DEBUG": true) in the config.json and saw anything out of the ordinary when sending a message?

from shulker.

Tholleman avatar Tholleman commented on September 13, 2024

This may be related to my issue. Minecraft messages can be sent to discord, however sending messages back does not contain the message content, only the user. The command executed is tellraw @a [{"color": "white", "text": "<@test> "}]

I added a small debug line that stringifies the message that is handled and it appears that cleanContent is empty.

This continues to be an issue, even after giving the bot every possible permission.

The full json is {"channelId":"1043838855041777716","guildId":"1043838760934199306","id":"1044557769459650610","createdTimestamp":1669112379184,"type":"DEFAULT","system":false,"content":"","authorId":"_redacted_","pinned":false,"tts":false,"nonce":"1044557768737947648","embeds":[],"components":[],"attachments":[],"stickers":[],"editedTimestamp":null,"webhookId":null,"groupActivityApplicationId":null,"applicationId":null,"activity":null,"flags":0,"reference":null,"interaction":null,"cleanContent":""}

from shulker.

destruc7i0n avatar destruc7i0n commented on September 13, 2024

@Tholleman can you share logs with DEBUG enabled? Thanks for the other debug line as well.

from shulker.

Tholleman avatar Tholleman commented on September 13, 2024

Sure! The discord message was sent with the nickname "test" to differentiate it from my minecraft name

$ npm run start

> [email protected] start
> node build/index.js

[INFO] Using configuration file: ./config.json
[INFO] Using Discord WebHooks to send messages
[INFO] Using configuration for local log file at "/home/tholleman/minecraft/server/logs/latest.log"
[INFO] Using channel #mc_chat (id: 1043838855041777716) in the server "Test"
[DEBUG] Received [20:54:48] [User Authenticator #1/INFO]: UUID of player tholleman is 38fe7cef-ff34-4d58-a9b1-fadd09eb6348
[DEBUG] Regex could not match the string:
Received: "[20:54:48] [User Authenticator #1/INFO]: UUID of player tholleman is 38fe7cef-ff34-4d58-a9b1-fadd09eb6348", Regex matches lines that start with: "\[Server thread/INFO\]:"
[DEBUG] Received [20:54:49] [Server thread/INFO]: tholleman[/REDACTED] logged in with entity id 41 at (886.6843001351089, -8.0, 1159.6440642896453)
[DEBUG] Received [20:54:49] [Server thread/INFO]: tholleman joined the game
[DEBUG] A player's connection status changed
[DEBUG] Received [20:54:53] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5143ms or 102 ticks behind
[DEBUG] Regex could not match the string:
Received: "[20:54:53] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5143ms or 102 ticks behind", Regex matches lines that start with: "\[Server thread/INFO\]:"
[DEBUG] Received [20:55:18] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 10256ms or 205 ticks behind
[DEBUG] Regex could not match the string:
Received: "[20:55:18] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 10256ms or 205 ticks behind", Regex matches lines that start with: "\[Server thread/INFO\]:"
[DEBUG] Received [20:55:57] [Server thread/INFO]: <tholleman> This does work
[DEBUG] A player sent a chat message
[DEBUG] Username: tholleman
[DEBUG] Text: This does work
[DEBUG] Fetched UUID 38fe7cefff344d58a9b1fadd09eb6348 for username "tholleman"

DISCORD MESSAGE SENT AT THIS POINT

[DEBUG] Building command from "{"channelId":"1043838855041777716","guildId":"1043838760934199306","id":"1044717958833909790","createdTimestamp":1669150571307,"type":"DEFAULT","system":false,"content":"","authorId":"REDACTED","pinned":false,"tts":false,"nonce":"1044717957680201728","embeds":[],"components":[],"attachments":[],"stickers":[],"editedTimestamp":null,"webhookId":null,"groupActivityApplicationId":null,"applicationId":null,"activity":null,"flags":0,"reference":null,"interaction":null,"cleanContent":""}"
[DEBUG] Sending command "tellraw @a [{"color": "white", "text": "<@test> "}]" to the server
[INFO] Authenticated with 127.0.0.1:25575
[DEBUG] Received response: 
[DEBUG] Received [20:56:11] [RCON Listener #2/INFO]: Thread RCON Client /127.0.0.1 started
[DEBUG] Regex could not match the string:
Received: "[20:56:11] [RCON Listener #2/INFO]: Thread RCON Client /127.0.0.1 started", Regex matches lines that start with: "\[Server thread/INFO\]:"
[DEBUG] Received response: 
[DEBUG] Rcon closed!
[DEBUG] Received [20:56:11] [RCON Client /127.0.0.1 #9/INFO]: Thread RCON Client /127.0.0.1 shutting down
[DEBUG] Regex could not match the string:
Received: "[20:56:11] [RCON Client /127.0.0.1 #9/INFO]: Thread RCON Client /127.0.0.1 shutting down", Regex matches lines that start with: "\[Server thread/INFO\]:"

Server log:

[20:53:05] [RCON Listener #2/INFO]: Thread RCON Client /127.0.0.1 started
[20:54:48] [User Authenticator #1/INFO]: UUID of player tholleman is 38fe7cef-ff34-4d58-a9b1-fadd09eb6348
[20:54:49] [Server thread/INFO]: tholleman[/REDACTED] logged in with entity id 41 at (886.6843001351089, -8.0, 1159.6440642896453)
[20:54:49] [Server thread/INFO]: tholleman joined the game
[20:54:53] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5143ms or 102 ticks behind
[20:55:18] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 10256ms or 205 ticks behind
[20:55:57] [Server thread/INFO]: <tholleman> This does work

DISCORD MESSAGE SENT AT THIS POINT

[20:56:11] [RCON Listener #2/INFO]: Thread RCON Client /127.0.0.1 started
[20:56:11] [RCON Client /127.0.0.1 #9/INFO]: Thread RCON Client /127.0.0.1 shutting down

from shulker.

destruc7i0n avatar destruc7i0n commented on September 13, 2024

Hmm this may be from Discord updates recently on pushing towards slash commands... Can you enable message content and guild members in the Discord Developer portal @Tholleman ?
image

from shulker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.