@nicat.dcw/discord-roles
v0.0.1
Published
🧃 Light Weight Discord Linked Roles Module with Discord API Interaction
Downloads
7
Maintainers
Readme
Light Weight Linked Roles Package with Discord API Interaction.
Start:
const { Client } = require("discord-roles")
const client = new Client({
CLIENT_TOKEN: "", // Enter your Discord Bot Token
CLIENT_ID: "" // Enter your Discord Bot ID
})
Adding MetaData:
client.add({
body: [
{
key: 'cake',
name: 'Make a Cake',
description: 'Days since baking their first cake',
type: 6, // Check discord developer portal
},
{
key: 'eat',
name: 'eat food for your health',
description: 'Health first importance in life',
type: 7, // Check discord developer portal
}
})
Update MetaData & Push MetaData:
client.updateMetaData("") // Enter Discord ID
client.pushMetaData({
userId: "", // User Id goes here
metadata: "", // Metadata here
id: "", // Discord ID goes here
token: "",
accessToken: "" // User AccessToken goes here
})
Generating Callback URL:
const { url, state } = client.generateCallBack({
callback:"" // Check Discord Developer Portal for Callback URL
});
Setting values to Storage:
client.storeDiscordTokens("key", "value") // Example userId, token