import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discord_bot: {
type: "app",
app: "discord_bot",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://discord.com/api/users/@me`,
headers: {
"Authorization": `Bot ${this.discord_bot.$auth.bot_token}`,
},
})
},
})
Discord Bot uses API keys for authentication. When you connect your Discord Bot account, Pipedream securely stores the keys so you can easily authenticate to Discord Bot APIs in both code and no-code steps.
This integration allows you to use the Discord API using your own Discord bot. If you don't use a custom bot, and you just need to use the Discord API, exit this screen and use the Discord integration, instead.
If you want to use your own Discord bot, but haven't created one yet, see these instructions or watch this video. You'll need to add this bot to your server(s) to make successful API requests.
Once you've created your bot, you'll find the Bot token within the Bot section of your app. Enter that token below.