Siple Posted February 18, 2020 Report Posted February 18, 2020 (edited) Hello, so I wanted to use the sendFriendMessage method to send a message to myself being a friend of the bot. I.e: a random user types a command and a message to submit a help request (ex !help <msg>), "Message sent by random user" is then sent using the sendFriendMessage to me friend of the bot but when I try that it logs Error: AccessDenied. Here is my code: let ownerID = my_main_account_id; //bot sends a message to owner to notify that a new help case was sent client.chat.sendFriendMessage(ownerID, `New help message received from <b>${username}<b>.`, (response, msg) => { console.log(response, msg);//response -> error AccessDenied and no msg }); Edited February 18, 2020 by Siple Quote
Dr. McKay Posted February 19, 2020 Report Posted February 19, 2020 What's the value of your ownerID? Quote
Recommended Posts
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.