Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Error while sending message #94

Closed
safazi opened this issue Mar 18, 2018 · 5 comments
Closed

Error while sending message #94

safazi opened this issue Mar 18, 2018 · 5 comments

Comments

@safazi
Copy link

safazi commented Mar 18, 2018

Unhandled rejection Error: Message failed
    at C:\Users\User\node_modules\roblox-js\lib\user\message.js:37:13
    at tryCatcher (C:\Users\User\node_modules\bluebird\js\release\util.js:16:23)

    at Promise._settlePromiseFromHandler (C:\Users\User\node_modules\bluebird\js
\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\User\node_modules\bluebird\js\release\pr
omise.js:569:18)
    at Promise._settlePromise0 (C:\Users\User\node_modules\bluebird\js\release\p
romise.js:614:10)
    at Promise._settlePromises (C:\Users\User\node_modules\bluebird\js\release\p
romise.js:693:18)
    at Async._drainQueue (C:\Users\User\node_modules\bluebird\js\release\async.j
s:133:16)
    at Async._drainQueues (C:\Users\User\node_modules\bluebird\js\release\async.
js:143:10)
    at Immediate.Async.drainQueues (C:\Users\User\node_modules\bluebird\js\relea
se\async.js:17:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

all of my arguments are correct, and i am using a rbx.jar()
sorry for bad formatting lmfao

@Neztore
Copy link

Neztore commented Mar 18, 2018

Can we see the code please

@safazi
Copy link
Author

safazi commented Mar 18, 2018

var rbx=require('roblox-js');

var username='redacted';
var password='redacted';

function login(){
	return rbx.login(username,password);
}

login().then(function(a){
	rbx.getCurrentUser('UserName').then(function(name){
		console.log(name);
	})
	rbx.message({recipient: redacted,subject:'whats brackin',body:'hi there buddy its me'}).then(function(){
		console.log('message sent');
	}).catch(function(err){
		console.log(err.message);
	});
});

logs to console: "Message failed"
This means the status is not 200.

@Neztore
Copy link

Neztore commented Mar 18, 2018 via email

@safazi
Copy link
Author

safazi commented Mar 18, 2018

i can send messages on that account. err.message is "Message failed"

@safazi
Copy link
Author

safazi commented Mar 18, 2018

Problem solved by manually sending a message on the account. All messages after that work fine.

@safazi safazi closed this as completed Mar 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants