@nicat.dcw/discord-roles

0.0.1 • Public • Published

Discord Roles

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

🥰 Made By Nicat.dcw

Package Sidebar

Install

npm i @nicat.dcw/discord-roles

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

17.6 kB

Total Files

14

Last publish

Collaborators

  • nicatdcw