Apparently I get this error when I try to rank players in my group with the application (with a bot account): Noblox - The use of cookieLogin is deprecated: Please make use of the new methods setCookie & refreshCookie.
Everything seems fine, however it seems like cookieLogin is deprecated, and I see no information on setCookie & refreshCookie online.
Script (java):
/*INSERT GROUP ID AND COOKIE BELOW*/
var groupId = 6299931 // << Replace 12345 with your Group Id
var cookie = "not showing" // << Put your account cookie inside of the quotes
/*INSERT GROUP ID AND COOKIE ABOVE*/
const express = require("express");
const rbx = require("noblox.js");
const app = express();
app.use(express.static("public"));
async function startApp() {
await rbx.cookieLogin(cookie);
let currentUser = await rbx.getCurrentUser();
console.log(currentUser.UserName);
}
startApp();
app.get("/ranker", (req, res) => {
var User = req.param("userid");
var Rank = req.param("rank");
rbx.setRank(groupId, parseInt(User), parseInt(Rank));
res.json("Ranked!");
});
const listener = app.listen(process.env.PORT, () => {
console.log("Your app is listening on port " + listener.address().port);
});
Module:
local BotManager = {}
local HttpService = game:GetService('HttpService')
local GlitchURL = 'not showing'
function BotManager:SetRank(UserId, Rank)
--game:GetService("HttpService"):GetAsync(GlitchURL .. "ranker?userid=%d" .. UserId .. "&rank=%d" .. Rank)
local Ok, Result = pcall(function()
HttpService:GetAsync('%s%d%d'):format(GlitchURL, UserId, Rank)
end)
end
return BotManager
If anyone is experienced in this field, I’d like an explanation of why it is deprecated and how it could be fixed, if possible.
/*INSERT GROUP ID AND COOKIE BELOW*/
var groupId = 6299931 // << Replace 12345 with your Group Id
var cookie = "not showing" // << Put your account cookie inside of the quotes
/*INSERT GROUP ID AND COOKIE ABOVE*/
const express = require("express");
const rbx = require("noblox.js");
const app = express();
async function run() {
await noblox.setCookie(cookie);
}
run();
app.use(express.static("public"));
async function startApp() {
await rbx.cookieLogin(cookie);
let currentUser = await rbx.getCurrentUser();
console.log(currentUser.UserName);
}
startApp();
app.get("/ranker", (req, res) => {
var User = req.param("userid");
var Rank = req.param("rank");
rbx.setRank(groupId, parseInt(User), parseInt(Rank));
res.json("Ranked!");
});
const listener = app.listen(process.env.PORT, () => {
console.log("Your app is listening on port " + listener.address().port);
});
setCookie appears to be working for me, so I assume you will have no issue. I created an account and used it’s new cookie and it sent me a friend request.
const noblox = require("noblox.js")
const cookie = "my super long and cool cookie"
async function start() {
await noblox.setCookie(cookie)
const delivered = await noblox.sendFriendRequest(39939779)
console.log(delivered)
}
start()
Yes, it works - however the bot refuses to rank the user.
Can I be logged in while this happens? (I am currently on the bot account trying to rank a group member in-game).
I see no errors, but the user’s rank won’t change.
Also it says it returns a promise? Try seeing what the promise resolves. rbx.setRank({group: groupId, target: parseInt(User), rank: parseInt(Rank)}).then((response) => console.log(response))
I’m not too familiar with express or noblox though.
Doesn’t log anything, everything seems broken and refuse to run.
I can’t really tell what the issue is either because this is my first time messing with it.
Do not always use code from the web. Make your own for the experience/knowledge as well as to prevent bugs. If I was you, I would look at the documentation found here: