Skip to content
Advertisement

how to sent request to discord bot API? [closed]

How do I properly send a discord API request, and where do I get a valid token to do that because my discord bot token did not work there?

async function APIrequest(){
    
    const lib = require('lib')({token: 'which API key?'});
    
    let result = await lib.discord.channels['@0.3.2'].retrieve({
      channel_id: channelid
    });
    
    console.log("result")
    console.log(result)
}

Advertisement

Answer

I assume you’ll find what you are looking for here: https://discord.com/developers/docs/getting-started#overview

I’ve included some of the info below. Also pay attention to rate limiting as api keys can be revoked if you step outside the guidelines.

Post could have been improved with more details of exactly what you want. Have you checked the docs and been unable to find answers?

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement