noblox / noblox.js Goto Github PK
View Code? Open in Web Editor NEWA Node.js API wrapper for Roblox.
Home Page: https://noblox.js.org
License: MIT License
A Node.js API wrapper for Roblox.
Home Page: https://noblox.js.org
License: MIT License
Getting a null pointer error every time I try to use getPlayers() to fetch a list of group members.
Cannot read property '1' of null
(noblox.js)\lib\group\getPlayers.js:157:62
I tried going in and manually editing the url
portion of opt
on/near line 135, since Roblox updated the syntax for group page URLs, but it didn't work. Might still be something to consider, though.
I am trying to have one account handing group join request while another doing something else. Is it possible to do that in one app?
Hello! I am coding a following bot. For testing I just made a Little bit of Code that follows some random dude. Seemingly it doesn't…
var rbx = require('noblox.js')
var ProgressBar = require('progress')
var js = require('JSONStream')
var fs = require('fs')
var group = 0
var cookie = "--MyCookie--"
var logged = rbx.cookieLogin(cookie)
.then(function () {
console.log(Succesfully logged in as ${logged}!
)
var userId = 1044994841;
rbx.follow(userId)
.then(function () {
console.log("WOW!")
})
})
Here's the output:
node app.js
Succesfully logged in as [object Promise]!
Unhandled rejection Error: Follow failed
at C:\Users\emeld\Desktop\node_modules\noblox.js\lib\user\follow.js:33:15
at tryCatcher (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\promise.js:517:31)
at Promise._settlePromise (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\promise.js:574:18)
at Promise._settlePromise0 (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\promise.js:619:10)
at Promise._settlePromises (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\promise.js:699:18)
at _drainQueueStep (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\async.js:138:12)
at _drainQueue (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\async.js:131:9)
at Async._drainQueues (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\async.js:147:5)
at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\emeld\Desktop\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
What can I do
I've tried 4-5 cookies and I'm still completely stuck on the error. Full log below;
Bad cookie.
Configuration error page listening
Error replicates both on OpenShift and when started locally.
Upon trying to use onWallPost, I am faced with this error:
Initialization failed: You do not have permission to view the wall
I asked Froast about it and he said that it was due to Roblox endpoint switches, and that it could be fixed but that he is no longer maintaining roblox-js.
https://cdn.discordapp.com/attachments/429453333640773638/435925845735899137/unknown.png
I would like to know when my robux changed so I can buy and delete an item and over and over again.
So I have a bot with the code:
Roblox.configureItem(2924369398,"bbb","aaa");
and it errors with
Unhandled rejection Error: Error configuring item, make sure not to sell unsellable items or anything else unusual.
yet all im editing is this model here: https://www.roblox.com/library/2924369398/aaa
rbx.setRank(2601636,483090613,9)
Says role doesn't exist
http://prntscr.com/nfsnrz
Is it possible to check if the user has bought a shirt or something?
Hello, I was wondering if it was possible to get the permissions of a users role?
If I'm ranked "Foo" in the group I should be able to get the permissions that role has.
Example, it'd return an array
Permissions = [
EXILE_MEMBERS: false,
VIEW_GROUP_WALL: true,,
];
Add the following to the wiki so people do not open issue's about rank not working:
//Optional:
var Username = args[1]
//Really Need To Add:
var strRank = args[2]
var Rank = Number(strRank)
You should add:
Status Changing (changeStatus(string))
Change the status on your profile (not the text, the online,studio,offline) state.
The code
evt.emit('handle', request, true, function () {
roblox.message(id, 'Welcome', 'Welcome to roblox..');
})
The cookie login works on one project, but not on another one. :(
When I using getinfo players, the embeds won't pop up. also the error too.
Example code:
**if(isCommand('info', message)){
var username = args[1]
if(username){
roblox.getIdFromUsername(username)
.then(function(id){
roblox.getUsernameFromId(id)
.then(function(username2){
roblox.getRankInGroup(groupId, id)
.then(function(rank){
roblox.getBlurb(id)
.then(function(blurb){
roblox.getStatus(id)
.then(function(status){
if(blurb){
if(!status){
let profile2embed = new Discord.RichEmbed()
.setColor("RANDOM")
.setFooter(`${copyrightfembed}`)
.setTimestamp()
.setImage(`https://www.roblox.com/Thumbs/BCOverlay.ashx?username=${username}`)
.setThumnail(`https://www.roblox.com/headshot-thumnail/image?userId=${id}&width=100&height=100&format=png`)
.addField("Username", username2)
.addField("ID", id)
.addField("Group rank", rank);
message.channel.send(profile2embed)
return;
}
let profile2embed = new Discord.RichEmbed()
.setColor("RANDOM")
.setFooter(`${copyrightfembed}`)
.setTimestamp()
.setImage(`https://www.roblox.com/Thumbs/BCOverlay.ashx?username=${username}`)
.setThumnail(`https://www.roblox.com/headshot-thumnail/image?userId=${id}&width=100&height=100&format=png`)
.addField("Username", username2)
.addField("ID", id)
.addField("Group rank", rank);
message.channel.send(profile2embed)
return;
}
if(!status){
let profile2embed = new Discord.RichEmbed()
.setColor("RANDOM")
.setFooter(`${copyrightfembed}`)
.setTimestamp()
.setImage(`https://www.roblox.com/Thumbs/BCOverlay.ashx?username=${username}`)
.setThumnail(`https://www.roblox.com/headshot-thumnail/image?userId=${id}&width=100&height=100&format=png`)
.addField("Username", username2)
.addField("ID", id)
.addField("Group rank", rank);
message.channel.send(profile2embed)
return;
}
})
})
})
})
})
}
}**
Help needed asap! My bot cannot login to roblox due to a captcha. I do not know how to solve it.
On line 24 of relog.js, the URL is https://www.roblox.com/authentication/signoutfromallsessionsandreauthenticate. I want this removed or changed so it doesn't sign out from every session.
I'm currently playing around with it a bit to see if I can change it to not log me out. So far no success.
When you do a command, it does it multiple times..
For some reason, I get this error when trying to use the login function. I tried manually logging in on my browser and did not get a captcha. I tried again, still the same error. Help?
Having an issue with the [ roles.oldRole.Name ] and [ roles.newRole.Name ], i use it in a send message format "channel.send("blah ${roles.oldRole.Name} blah")"
Any idea how to fix this? It worked on a previous version in the past and now it's not working anymore? Has the syntax changed or something? Any help appreciated!
This is a function from the original Roblox-js.
I'm currently in the process of creating an onAuditLog event, as it's been requested heavily and during the course of this I've noticed getAuditLog is duplicating several of the values.
I've had a brief look and couldn't see a source of duplication.
Is anyone else able to see the cause?
I was assigned the task (by Bot Services) of making this dependency compatible with our hosting provider (Heroku). As stated in the README, "we store the cookie internally in a file, and files do not persist in Heroku." I plan to resolve this by storing the cookie in a database.
If I make a pull request to support this, which would be preferable (please add a reaction or comment)?
ROBLOX has integrated a funcaptcha.. unable to login.
2018-12-22T23:05:41.313868+00:00 app[worker.1]: Error: Login failed: You must pass the robot test before logging in.
2018-12-22T23:05:41.313873+00:00 app[worker.1]: at /app/node_modules/noblox.js/lib/user/login.js:54:17
2018-12-22T23:05:41.313875+00:00 app[worker.1]: at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
2018-12-22T23:05:41.313878+00:00 app[worker.1]: at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:512:31)
2018-12-22T23:05:41.313880+00:00 app[worker.1]: at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:569:18)
2018-12-22T23:05:41.313882+00:00 app[worker.1]: at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:614:10)
2018-12-22T23:05:41.313883+00:00 app[worker.1]: at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:694:18)
2018-12-22T23:05:41.313885+00:00 app[worker.1]: at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:138:12)
2018-12-22T23:05:41.313887+00:00 app[worker.1]: at _drainQueue (/app/node_modules/bluebird/js/release/async.js:131:9)
2018-12-22T23:05:41.313888+00:00 app[worker.1]: at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:147:5)
2018-12-22T23:05:41.313890+00:00 app[worker.1]: at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:17:14)
2018-12-22T23:05:41.313892+00:00 app[worker.1]: at runCallback (timers.js:705:18)
2018-12-22T23:05:41.313893+00:00 app[worker.1]: at tryOnImmediate (timers.js:676:5)
2018-12-22T23:05:41.313895+00:00 app[worker.1]: at processImmediate (timers.js:658:5)
The title says it all. I once was in a discord server with roblox api stuff. I got a new disc acc and can't find it anymore.
I have some things that i want to be added!
Fix joinGroup (use https://www.roblox.com/groups/join-group-ajax)
Add membership info at getPlayerInfo
Add delete InventoryItem (use https://www.roblox.com/asset/delete-from-inventory)
Thank you!
Example:
(async () => {
var actualMessageWithAuthor = ${responseArray[0]} - By ${rblxUsernameFetcher.rblxUsername}
if (actualMessageWithAuthor.length > 183){
message.delete()
return message.author.send(:warning: YOU HAVE EXCEEDED THE CHARACTER LIMIT BY **${actualMessageWithAuthor.length-183}** characters. REDUCE YOUR SHOUT AND TRY AGAIN :warning:\n\nYour shout -\n**${responseArray[0]}**
)
}
groupId.postShout(${actualMessageWithAuthor} | Join our communication for more info!
)
})();
rbx.setRank({ group: 2601636, target: Number(post["Id"]), rank: 7 }) // post["Id"] this is JSON data when post async don't mind it
Immediately as my bot attempts to login to ROBLOX, I get this error:
(node:18312) UnhandledPromiseRejectionWarning: Failed to sign in, make sure all your credentials are correct. If you know they are correct, you might have gotten a captcha. Status code: 403, message: Forbidden
(node:18312) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18312) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I need to get past this, otherwise my bot no longer functions at all.
Could anybody help me with this
Describe the bug
The bug errors and breaks code when a user is not in the group.
To Reproduce
call rbx.exile(groupid, userid) when the userid is not in the group
Instead of a rejection happening the exile.js errors and breaks the code
The issue is happening in the res.body.errors where there is no errors in the body
Expected behavior
I expected the bot to reject and not break the code.
Nothing is put into the output, the function just doesn't run.
EDIT: This is the error that appears when attempting to run the function:
Noblox.groupPayout(groupid,Number(firstcard.name),5,false,false)
is what I'm trying to do, but nothing is happening. Ranking players works perfectly, and this is being attempted on the owner of the group's account so permissions aren't a problem.
Using this code, 9/10 times I receive "Token Validation Failed". It is very annoying and I can't seem to find a way around it(even using jar).
var rbx = require('noblox.js') rbx.login("Username","Password") .then(function(){ console.log(":)") }) .catch(function(err) { console.log(err) })
Hi there!
I use noblox.js for easier communication with Roblox. I use cookieLogin to bypass captcha, although it's not working.
I've used a catch function to receive information why this isn't working, resulting in the following:
Bad cookie.
Failed to log in: Error: You are not logged in.
The bad cookie is from util/relog.js as I've noticed. I'll appreciate a solution so I can continue my work. 😃
Hello!
When I use function getBlurb this return as case. How do I unpack it?
Hi,
I know that this does not work anymore because of the new group layout, but does someone know when this is going to be fixed?
Ciaran
I use Group Functions such as setRank and it says "Invalid permissions". I go and rank someone a few times to farm some captchas, then it works! This means, captchas a preventing the bot and this is a bug needing to be fixed. You could possibly use https://www.npmjs.com/package/deathbycaptcha to solve the captchas and the issue can be resolved. This may also have to do with the Group Events not working, as Roblox is adding captchas EVERYWHERE.
Describe the bug
I am running the shout
and promote
function. And I keep getting this error. I don't know what is going on but I need some help or a back end fix needs to possibly be implemented.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It is suppost to act normally and promote the person specified, or shout what is specified in the arguments.
Screenshots
Logged in.
_http_client.js:70
throw new ERR_INVALID_DOMAIN_NAME();
^
TypeError [ERR_INVALID_DOMAIN_NAME]: Unable to determine the domain name
at new ClientRequest (_http_client.js:70:13)
at request (http.js:42:10)
at Object.get (http.js:46:13)
at Timeout.setInterval [as _onTimeout] (C:\Users\<anonymous>\Documents\SweetCreations\robloxcmds.js:10:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)```
Anyone can help me with this problem? cuz I use setRank
Example:
var rankIdentifier = Number(args[2]) ? Number(args[2]) : args[2];
if (!rankIdentifier) return message.channel.send("Please enter a name, and id.");
roblox.setRank(groupId, id, rankIdentifier)
.then(function(newRole){
//message.channel.send(Changed rank to ${newRole.Name}
)
let sendrankembed = new Discord.RichEmbed()
.setColor("#4682B4")
.setFooter(${copyrightfembed}
)
.setTimestamp()
.addField("Rank command", Success changed rank.
);
They throw this error every time: Error: {"success":true}
Here's my code:
const Rbx = require("noblox.js");
exports.run = async (client, message, [AssetID], level) => { // eslint-disable-line no-unused-vars
if (!AssetID) {
message.channel.send("You must provide an asset ID to wear.");
return;
}
const Msg = await message.channel.send("Putting on asset...");
const Data = {
assetId: parseInt(AssetID),
};
Rbx.wearAssetId(Data)
.then(function() {
Msg.edit(`${AssetID} has been added to the users appearance.`);
})
.catch(function(err) {
Msg.edit(`${err}`);
});
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: "Bot Owner"
};
exports.help = {
name: "wearassetid",
category: "Miscelaneous",
description: "Makes user wear the given asset id.",
usage: "wearassetid <assetId>"
};
Why does my bot keep sending random shouts that have never been sent in the group? The shouts have nothing on them and it says that the person who sent the message is ".". I need help!
Most everything needs documentation applied to it in JSDoc form.
Tried to use the getPlayers function but it returned this in the console:
Error: 400 : Bad Request
at Request._callback (C:\Users\zombi\Desktop\Carl\node_modules\noblox.js\lib\group\getPlayers.js:17:55)
at Request.self.callback (C:\Users\zombi\Desktop\Carl\node_modules\request\request.js:185:22)
at Request.emit (events.js:203:13)
at Request. (C:\Users\zombi\Desktop\Carl\node_modules\request\request.js:1161:10)
at Request.emit (events.js:203:13)
at IncomingMessage. (C:\Users\zombi\Desktop\Carl\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:291:20)
at IncomingMessage.emit (events.js:208:15)
at endReadableNT (_stream_readable.js:1161:12)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
This is my code:
Roblox.getPlayers(2654608, 255).catch(function(error) {
console.log(error);
});
There is no documentation, aka wiki for functions. pls fix.
Create an event called .onAuditLog
, which will send a customizable message to a specified channel on Discord.
An example of how it would like is:
const groupId = 'groupId_here';
const groupLogs = roblox.onAuditLog(groupId);
groupLogs.on('data', function(log) {
let embed = new Discord.RichEmbed()
.setColor('BLUE')
.setDescription('A new action has been done. Here are the logs.')
.addField('User', 'log.logger.username)
.addField('Action Type', log.type.name)
.addField('Action Information', 'log.body);
bot.channels.get('1234567890').send(embed);
});
groupLogs.on('error', function(err) {
console.log(err.stack)
});
Edit: If you create this feature, please make it easier to novice noblox.js users by giving an example on the Wiki page, at Group#functions page.
A simple argument for where the cookie file is/what it's named would make deploying apps based on noblox easier.
I dont know why what i do wrok it still give me bad request here this is my code
const roblox = require('noblox.js')
const cookie = tempVars('cookie')
const group = tempVars("groupid")
const user = tempVars("userid")
const robux = tempVars("rbx")
roblox.cookieLogin(cookie)
.then(function() {
console.log('Logged on.')
roblox.groupPayout(group, user, [robux])
})
.catch(function(error) {
console.log(error)
});
dont care about [robux] it very impotent the group api send me a info w/ []
Any way to detect if a certain item is bought off the roblox catalog?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.