Jump to content
McKay Development

Recommended Posts



My BoT is in a couple group chat rooms and is catching all messages starting with "!" in order to execute commands.

I have an issue every time someone joins the chat room and Steam displays this:




BoT returns:

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of null

I thought that "messages" and server_messages were 2 different items, so why the error when my code is:

function parseMessage(groupID, chatID, message, senderID, senderAccountID, sender) {
    if (message && !message.startsWith('!')) {

Isn't the "joined" stuff a server message? How do I get rid of the error?


Thanks as always  :P

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...