Hello my fellow robloxians. Everyday there are bots going around and posting scams in groups. and if you are like me then there are quete allot of scam posts in your group. so here i have a bot that will automaticly remove them and keeps an eye out for new incomming ones, a big thanks to @Etheroit who actualy helped me with the api’s
here are the following steps.
-
install Node.JS
-
install some sort of Code editor, i am using Atom
-
make a Folder on your desktop. name doesnt matter here,
-
Hold Shift and right click inside the folder and select run Commandpromt or Run Powershell
-
Follow these following images.
-
and then keep these empty and put your name in author
-
its asking you if the information is ok. just type
yes
and press enter -
alright its time to open your Code Editor, first what we are going to do is Make a index.js file, we located that at point 9,
13.alright we need to install 2 packages. open the commandpromt / powershell and type these lines
npm install npm install roblox.js
npm install request --save if request is saying can not be found. search on the node.js for the latest one,
this one is optional this will update your bot and restart when there are changes to the files,
npm install nodemon -g
- paste this code in side your index.js
var rbx = require('roblox.js');
var request = require('request');
var username = 'UserName of your bot';
var password = 'Pass of your bot';
var groupId = "00000";;
var keywords = [
"thousands of robux",
"thousands",
"is giving access to",
"giving access",
"all game passes",
"this is an official event",
"official event",
"no info needed","to the following link",
"👉: rewardtool.se",
"rewardtool.se",
"rewardtool"
];
rbx.login(username, password).then(function() {
console.log("LoggedIn");
rbx.getWall({group: groupId}).then(function(data){
var posts = data.posts
for(var i = 0; i < data.posts.length; i++) {
var found = 0;
var message = data.posts[i]
for (let phase of keywords) {
if (message.content.toLowerCase().search(phase) != -1) found +=5;
}
if (/\S+\.\S+/.exec(message.content)) {
// found += 5;
}
if (found >= 5) {
console.log("Removing Scam post from " + message.author.name );
rbx.deleteWallPost({id:message.id, group:groupId}).catch(function(e) { });
// rbx.exile({group: groupId, target: message.author, deleteAllPosts: true});
}
}
}).catch(function(e) { console.log(e); });
var onWallPost = rbx.onWallPost({group: group});
onWallPost.on("data", function(data) {
var found = 0;
for (let phase of keywords) {
if (data.content.toLowerCase().search(phase) != -1) found+=5;
}
if (/\S+\.\S+/.exec(data.content)) {
// found += 5;
}
if (found >= 5) {
console.log("Removing post with `" + data.content + "`` content!");
rbx.deleteWallPost({id:data.id, group:groupId}).catch(function(e) { });
}
});
onWallPost.on("close", function(e) { console.log("The event has disconnected!"); });
onWallPost.on("error", function(e) {});
}).catch(function(e) {});
.15 Make a .bat script that runs the bot
node index.js
pause
Note if you installed nodemon use the following .bat code
nodemon index.js
pause
Here are the files if yours is not working.
if anything is not working or if your having trouble please comment under here. and i try to find a solution