#help me

1 messages · Page 1 of 1 (latest)

haughty kraken
#
    data.cancel = true
    const ChatRank = data.sender.getTags().find((tag) => tag.startsWith("ChatRank:"))?.slice(9) ?? "§6User";
    const PlayerName = data.sender.name
    const Message = data.message
    const ChatFormWorldSay = `[ ${ChatRank} §r] ${PlayerName} §r> ${Message}`
    world.say(`${ChatFormWorldSay}`)
}

world.beforeEvents.chatSend.subscribe((data) => {
    ChatForm(data)
})```

[2023-06-16 22:40:56:728 ERROR] [Scripting] TypeError: not a function    at ChatForm (main.js:18)
    at <anonymous> (main.js:22)

Whyyyy?
weak sky
#

whats on line 18

dawn hull
#

oh it's not :v

alpine kestrelBOT
#
Debug Result

JavaScript/TypeScript code blocks not detected in [message](#1119261190632251502 message).
You can either send the script in code block highlighted in JS format:

​`​`​`js
world.sendMessage("Hello World");
​`​`​`

Or Send an attachment end in .js to debug the file.

dawn hull
#

try changing world.say to world.sendMessage