1.0.7 • Published 2 years ago
lvckyworld-api v1.0.7
npm-lvckyworld-api
The official LvckyWorld-API as NPM PACKAGE
Content:
Functions:
- getDcGlobalBanList()
- getDiscordUserInfo()
- getLvckyWorldTeamler()
- getSysAdmins()
- isSystemAdmin()
- isGlobalBanned()
Install the Package
First you have to install the package via npm.
You have to run the command: npm install lvckyworld-api
.
Then you have to import the package.
Example
TypeScript
import * as api from 'lvckyworld-api';
JavaScript
const api = require('lvckyworld-api')
Now you can use the methods.
Some possible methods:
getDcGlobalBanList()
Example
import * as api from 'lvckyworld-api'
api.MARINA.getDcGlobalBanList().then(response => {
console.log(response)
}).catch(err => { console.log(err) });
Response Interface
interface lwGlobalBan {
globalbans: [
{
clientid: string,
clientavatar: string,
clientname: string,
banreason: string,
bancreatorid: string,
bancreatorname: string,
bannedOn: string,
timestam: string,
permis: boolean
}
]
}
getDiscordUserInfo(discordId: string)
Example
import * as api from 'lvckyworld-api'
api.MARINA.getDiscordUserInfo('761890770935611412').then(response => {
console.log(response)
}).catch(err => { console.log(err) });
Response Interface
interface lwDiscordInfo {
id: string,
username: string,
avatar: string | null,
avatar_decoration: string | null,
discriminator: string,
public_flags: number | null,
banner: string | null,
banner_color: string | null,
accent_color: string | null
}
getLvckyWorldTeamler()
Example
import * as api from 'lvckyworld-api'
api.MARINA.getLvckyWorldTeamler().then(response => {
console.log(response)
}).catch(err => { console.log(err) });
Response Interface
interface lwTeamler {
teamMembers: [
{
clientname: string,
clientid: string,
roleName: string,
roleId: string,
highestRoleId: number,
sortId: number
}
]
}
getSysAdmins()
Example
import * as api from 'lvckyworld-api'
api.MARINA.getSysAdmins().then(response => {
console.log(response)
}).catch(err => { console.log(err) });
Response Interface
interface lwSysAdmin {
lvckyworld: [
{
name: string,
clid: string,
role: string
}
]
}
isSystemAdmin(discordId: string)
Example
import * as api from 'lvckyworld-api'
api.MARINA.isSystemAdmin.then(response => {
console.log(response)
}).catch(err => { console.log(err) });
boolean
isGlobalBanned(discordId: string)
Example
import * as api from 'lvckyworld-api'
api.MARINA.isGlobalBanned.then(response => {
console.log(response)
}).catch(err => { console.log(err) });
Response
boolean