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

Bot is crashing on certain server messages #28

Open
Chitasa opened this issue Aug 4, 2021 · 0 comments
Open

Bot is crashing on certain server messages #28

Chitasa opened this issue Aug 4, 2021 · 0 comments

Comments

@Chitasa
Copy link

Chitasa commented Aug 4, 2021

Certain commands crash the bot on an Aternos Spigot Server when doing msg.toAnsi(), for instance setworldspawn and effect.

Error Message:

TypeError: [sprintf] expecting number but found string
    at sprintf_format (C:\Users\...\node_modules\sprintf-js\src\sprintf.js:62:27)
    at sprintf (C:\Users\...\node_modules\sprintf-js\src\sprintf.js:26:16)
    at vsprintf (C:\Users\...\node_modules\sprintf-js\src\sprintf.js:30:24)
    at ChatMessage.toMotd (C:\Users\...\node_modules\prismarine-chat\index.js:311:23)
    at C:\Users\...\node_modules\prismarine-chat\index.js:308:49
    at Array.map (<anonymous>)
    at ChatMessage.toMotd (C:\Users\...\node_modules\prismarine-chat\index.js:308:30)
    at ChatMessage.toAnsi (C:\Users\...\node_modules\prismarine-chat\index.js:347:24)
    at EventEmitter.<anonymous> (C:\Users\...\src\silentBot.js:100:35)
    at EventEmitter.emit (events.js:315:20)

JSON Message of setworldspawn:

{
  "italic": true,
  "color": "gray",
  "translate": "chat.type.admin",
  "with": [
    "O_o_f",
    {
      "translate": "commands.setworldspawn.success",
      "with": [
        "10",
        "114",
        "-2"
      ]
    }
  ]
}
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

1 participant