The Javascript wrapper made for The All Seeing Eye's API
http://npmjs.com/tase
| src | ||
| .gitignore | ||
| .npmignore | ||
| bun.lock | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
The All Seeing Eye API
This is the official wrapper for determining if a user was caught in a server that breaks ROBLOX's Terms Of Service, ranging from Bypassing (specifically NSFW) Servers to Condo and Rule34 servers!
This package was made with the intention of supporting everything.
- Usable between NodeJS and Browser Environments
- Made to support all Javascript language specifications (ECMAScript and CommonJS)
- Made in & supports TypeScript!
All examples below are written in ECMAScript, but you can use require too!
Creating a Client
Creating a client is simple!
import { Client, isTASEError } from "tase"
const TASEClient = new TASEClient({
token: "ey***.***.***pI"
})
await TASEClient.login()
.then(session => console.log(`Logged in as ${session.appName} as ${session.keyName}!`))
.catch(ex => {
if(isTASEError(ex)){
console.log(ex.cause)
}
})
| Name | Type | Default | Use |
|---|---|---|---|
| token | string | None | This is required for most actions on the API. |
| server | string? | api.tasebot.org |
This is intended for testing. |
| reconnectTime | string? | 5000 |
If the client disconnects from the appeal socket, it'll automatically reconnect in this interval. |
Check Functions
// Scan one user
await TASEClient.check("1343809149376528434")
// Scan multiple users
await TASEClient.scan(["1422001427085266975", "1438300200690126998"])
Appeal Notifications
Before using these functions, you will need to know the following details:
- Appeal notifications are one time for privacy, make sure your code does not error before using refetchNotifications.
- Notifications are not sent by default. You will need the user to authorize your bot.
- Legacy keys are unable to use this API, as they have a completely different data structure from new keys.
function HandleAppeal(UserId: string){
// do whatever business you have with these notifications
}
TASEClient.subscribeToNotifications(HandleAppeal)
await TASEClient.refetchNotifications()
.then((Notifications) => Notifications?.forEach(HandleAppeal))
Data Endpoints
TASE also provides a few useful data endpoints you may need to know about.
Guild Types
TASEClient.getTypes() // Array<GuildType>
| Key | Value Type | Purpose |
|---|---|---|
| id | string |
The type's main identifier, this should be used in database configurations, as they will never change. |
| name | string |
The display name of the type. |
| emoji | string | null |
A unicode emoji representing this type. This can be used to spice up certain UI elements. |
| summary | string |
A short summary on why this server is flagged and the criteria for servers under this type. |
Session Data
TASEClient.session // SessionDetails | null
| Key | Value Type | Purpose |
|---|---|---|
| appName | string |
The name of the application assigned to the token. |
| keyName | string |
The name of the current token. |
| expires | Date | null |
When does this key expire? |
| ownedBy | string |
Who is this key owned by? (returns a Discord UserID associated with the person who made the key) |
| legacy | boolean |
Is this key using the legacy system? |