easy-discord-join
v0.0.5
Published
Package to help with easy OAuth2
Downloads
7
Readme
Easy Discord Join
Usage:
var DiscordJoin = require("easy-discord-join")
var JoinClient = new DiscordJoin({
CLIENT_SECRET: 'client_secret',
CLIENT_ID: 'client_id',
SERVER_ID: 'server_id', //server to add users to
CALLBACK_URL: 'https://yourcallbackurl.com/callbackroute', //callback uri
TOKEN: 'discord_bot_token'
})
async function addUser(userID, access_token) {
return await JoinClient.addMember(userID, accecss_token)
}
addUser('0100101010101001', 'kbdaas.92JEHGF') //fake userid and access_token, but who cares?
addMember(userID, access_token)
-
- userID: ID of user adding to server
- access_token: Access Token for the user (granted from OAuth callback, check example @ line 21 for access_token usage.)
Check the API for more info.