1.1.9 • Published 9 years ago

discord-app-manager v1.1.9

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

Discord App Manager

This only works with user accounts!


First, you must create an instance of the module by doing this:

const AppManager = require('discord-app-manager')
const token = 'USER TOKEN'
const apps = new AppManager(token)

getApps

apps.getApps()
Returns {Promise<Array<App Object>>}

getApp

apps.getApp(appID)
ParameterTypeDescription
appIDStringThe client ID of the application
Returns {Promise<App Object>}

createApp

apps.createApp(details)
ParameterTypeDescription
detailsObjectAn object with the application's details
details.nameStringThe name of the application
details.descriptionString | undefinedThe application's description
details.iconString | undefinedA Base64 data URI of the icon
details.bot_publicBoolean | undefinedWhether the bot should be public or not
details.rpc_originsArray | undefinedAn array of RPC Origins for the application
details.redirect_urisArray | undefinedAn array of redirect URIs for the application
details.bot_require_code_grantBoolean | undefinedWhether the bot should require a code grant or not
Returns {Promise<App Object>}

editApp

apps.editApp(appID, details)
ParameterTypeDescription
appIDStringThe client ID of the application you wish to edit
detailsObject | undefinedAn object with the details of the application you wish to edit
details.nameStringThe name of the application
details.descriptionString | undefinedThe application's description
details.iconString | undefinedA Base64 data URI of the icon
details.bot_publicBoolean | undefinedWhether the bot should be public or not
details.rpc_originsArray | undefinedAn array of RPC Origins for the application
details.redirect_urisArray | undefinedAn array of redirect URIs for the application
details.bot_require_code_grantBoolean | undefinedWhether the bot should require a code grant or not
Returns {Promise<App Object>}

deleteApp

apps.deleteApp(appID)
ParameterTypeDescription
appIDStringThe client ID of the application you wish to delete
Returns {Promise}

createBotUser

apps.createBotUser(app)
ParameterTypeDescription
appString | ObjectThe client ID of the application you wish to turn into a Bot User, or the details of the Bot User you wish to create
Returns {Promise<App Object>}

Application Object

FieldTypeDescription
redirect_urisArrayAn array of redirect URIs for the application
descriptionStringThe description of the application
rpc_originsArrayAn array of RPC Origins for the application
bot*Bot ObjectThe bot object of the application
bot_require_code_grantBooleanWhether the bot requires a code grant or not
nameStringThe name of the application
secretStringThe secret code for the application
bot_publicBooleanWhether the bot is public or not
idStringThe client ID of the application
iconString | nullA hash of the application's icon

* This is only available if the application is a bot user


Bot Object

FieldTypeDescription
usernameStringThe username of the bot user
botBooleanThis should always be true unless you have a userbot somehow
tokenStringThe auth token for api calls with the bot user
avatarString | nullThe hash of the bot user's avatar
discriminatorStringThe discriminator of the bot user
idStringThe ID of the bot user
1.1.9

9 years ago

1.1.8

9 years ago

1.1.7

9 years ago

1.1.6

9 years ago

1.1.5

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago