The official LvckyWorld-API as NPM PACKAGE
- getDcGlobalBanList()
- getDiscordUserInfo()
- getLvckyWorldTeamler()
- getSysAdmins()
- isSystemAdmin()
-
isGlobalBanned()
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.
import * as api from 'lvckyworld-api';
const api = require('lvckyworld-api')
Now you can use the methods.
import * as api from 'lvckyworld-api'
api.MARINA.getDcGlobalBanList().then(response => {
console.log(response)
}).catch(err => { console.log(err) });
interface lwGlobalBan {
globalbans: [
{
clientid: string,
clientavatar: string,
clientname: string,
banreason: string,
bancreatorid: string,
bancreatorname: string,
bannedOn: string,
timestam: string,
permis: boolean
}
]
}
import * as api from 'lvckyworld-api'
api.MARINA.getDiscordUserInfo('761890770935611412').then(response => {
console.log(response)
}).catch(err => { console.log(err) });
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
}
import * as api from 'lvckyworld-api'
api.MARINA.getLvckyWorldTeamler().then(response => {
console.log(response)
}).catch(err => { console.log(err) });
interface lwTeamler {
teamMembers: [
{
clientname: string,
clientid: string,
roleName: string,
roleId: string,
highestRoleId: number,
sortId: number
}
]
}
import * as api from 'lvckyworld-api'
api.MARINA.getSysAdmins().then(response => {
console.log(response)
}).catch(err => { console.log(err) });
interface lwSysAdmin {
lvckyworld: [
{
name: string,
clid: string,
role: string
}
]
}
import * as api from 'lvckyworld-api'
api.MARINA.isSystemAdmin.then(response => {
console.log(response)
}).catch(err => { console.log(err) });
boolean
import * as api from 'lvckyworld-api'
api.MARINA.isGlobalBanned.then(response => {
console.log(response)
}).catch(err => { console.log(err) });
boolean