Giter VIP home page Giter VIP logo

rasb-api's Introduction

RASB API

A NPM package for interacting with the RASB Web API

Getting Started

In order to use the RASB API you must obtain an API key.

Example

const rasb = require("rasb");
var RASB = new rasb("api key");

// Check if a user is banned

RASB.isUserBanned("12345").then((banned) => {
  if (banned) {
    console.log("User is banned!");
  } else {
    console.log("User isn't banned!");
  }
}).catch((err) => {
  console.log("Error processing request! " + err);
});

See the wiki for more information.

rasb-api's People

Contributors

charliea21 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

asimulined

rasb-api's Issues

Having a small issue with using this with discord.js

Hi. I did mention this in the RASB Discord, however I'm still having issues, and I want to make sure to put it in here in case anyone else has a similar one.

const apiKey = "RASB API HERE";

const rasb = require("rasb");
const RASB = new rasb(apiKey);

const Discord = require('discord.js');
const client = new Discord.Client();

client.on('guildMemberAdd', member => { 
    const user = member.user.id;
        RASB.isUserBanned(user).then((banned) => {
            if (banned) {
                console.log("User is banned!");
                member
                    .ban({
                        reason: "This user is blacklisted on the RASB Database.",
                    })
            } else {
                console.log("User isn't banned!");
            }
        }).catch((err) => {
            console.log("Error looking up new user! " + err);
        });
});

client.login('DISCORD BOT TOKEN HERE')

So, this should check if a new user who joins is on the RASB database. If they are in it, they will get banned. I tried joining with my alt, and nothing came up on the console (I coded it so it said on the console if someone is banned or not.
Any ideas?

Hey I have a question

Do you still have the roblox cookie logger I need it I also need instructions and steps thanks

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.