Discloud-API
This is a unofficial NPM Package of Discloud API. Este é um pacote NPM não oficial para a API da Discloud.
Contribuintes são bem-vindos. ❤️ Contributors are welcome. ❤️
How to Use
...
const api = new DiscloudAPI('Your Token')
Functions
- userStatus() ⇒
Promise.<(UserStatus|void)>
Get status of user.
- get(bot_id) ⇒
Promise.<(GetBot|void)>
Get data of a bot.
- logs(bot_id) ⇒
Promise.<(BotLogs|void)>
Get log of a bot.
- restart(bot_id) ⇒
Promise.<(BotRestart|void)>
Restart the bot.
Promise.<(UserStatus|void)>
userStatus() ⇒ Get status of user.
Kind: global function Author: GardZock
Example
...
const data = await <(DiscloudAPI)>.userStatus()
//Returns the user data.
Promise.<(GetBot|void)>
get(bot_id) ⇒ Get data of a bot.
Kind: global function Author: GardZock
Param | Type | Description |
---|---|---|
bot_id | string |
ID of Bot |
Example
...
const bot = await <(DiscloudAPI)>.bot.get('bot id')
//Returns the bot data.
Promise.<(BotLogs|void)>
logs(bot_id) ⇒ Get log of a bot.
Kind: global function Author: GardZock
Param | Type | Description |
---|---|---|
bot_id | string |
ID of Bot |
Example
...
const logs = await <(DiscloudAPI)>.bot.logs('bot id')
//Returns the logs of bot.
Promise.<(BotRestart|void)>
restart(bot_id) ⇒ Restart the bot.
Kind: global function Author: GardZock
Param | Type | Description |
---|---|---|
bot_id | string |
ID of Bot |
Example
...
const restart = await <(DiscloudAPI)>.bot.restart('bot id')
//Returns a message if sucess, if not return a error.