Code Monkey home page Code Monkey logo

noblox.js's People

Contributors

0jc1 avatar alanbixby avatar amauryeen avatar amazman avatar billyh-0167 avatar chosey98 avatar chrisvanchip avatar commonly-ts avatar dependabot-preview[bot] avatar dependabot[bot] avatar eirikfa avatar eragamer avatar firsttobebear avatar gamenew09 avatar gestait avatar goldenjayz avatar hamzah-z avatar neztore avatar onlytwentycharacters avatar policetonyr avatar popeeyy avatar regalijan avatar sentanos avatar siim0n avatar sqikerz avatar suufi avatar timing1337 avatar tomerj avatar unix-system avatar waviestballoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

noblox.js's Issues

Group function "getPlayers" does not work

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.

[ERROR] Unhandled rejection Error: Follow failed

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

Continued Error Messages

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.

Add Roles Permissions

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,,
];

Suggestion:

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)

Please add this.

You should add:
Status Changing (changeStatus(string))
Change the status on your profile (not the text, the online,studio,offline) state.

Error while using info players.

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;
            }
          })
          })
      })
      })
})

}
}**

ROBLOX Login Captcha

Help needed asap! My bot cannot login to roblox due to a captcha. I do not know how to solve it.

Undefined group roles

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!

getAuditLog returns duplicate values

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?

Custom cookie loading

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)?

  • Flexibility: I add an option to provide functions for saving and loading the cookie. ❤️
  • Ease-of-use: I add an option to provide a connection url to a JDBC-compatible database (requires Java 1.7+). 🚀
  • Both: I could do both, whoever in that case, I'd be more inclined to provide examples for the save and load functions that are tailored to specific database types (MySQL, SQL Server, PostgreSQL). 👀

Login Issue [Funcaptcha]

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)

TypeError: groupId.postShout is not a function

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!)
})();

Captcha on Login

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

[BUG] res.body.errors is undefined when user is not in group

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.

Group Payout doesn't seem to work

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:

image

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.

Login function is rarely successful

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) })

Bad cookie with right cookie

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. 😃

getWall() not working.

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

Group Functions sometimes don't work due to captchas

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.

[BUG] ERR_INVALID_DOMAIN_NAME

Before posting a bug, be sure that someone else has not posted it already and it is an actual bug with noblox.js and not other frameworks like discord.js

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:

  1. Turn on the file using node (not pm2)
  2. Run the promote and shout command
  3. Wait 2 minutes
  4. See error

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)```

Error: Role does not exist

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.);

removeAssetId and wearAssetId throwing errors on success

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>"
};

Help!

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!

[BUG]getPlayers returns Error 400: Bad Request

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);
});

onAuditLog event

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.

The group payout not work and still get bad request!

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/ []

so why it still give me bad request
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.