Discord Bot

Use this app to interact with the Discord API using a bot in your account

Go to site

Integrate the Discord Bot API with the MongoDB API

Setup the Discord Bot API trigger to run a workflow which integrates with the MongoDB API. Pipedream's integration platform allows you to integrate Discord Bot and MongoDB remarkably fast. Free for developers.

Popular Ways to Connect Discord Bot with MongoDB

1
-
3
of
3
integrations by popularity

Popular Discord Bot and MongoDB Triggers

1
-
1
of
1
triggers by popularity

Popular Discord Bot and MongoDB Actions

1
-
6
of
14
actions by popularity

Connect Discord Bot

return await require("@pipedreamhq/platform").axios(this, {
  url: `https://discord.com/api/users/@me`,
  headers: {
    "Authorization": `Bot ${auths.discord_bot.bot_token}`,
  },
})

Connect MongoDB

const MongoClient = require('mongodb').MongoClient

const {
  database,
  hostname,
  username,
  password,
} = auths.mongodb

const url = `mongodb+srv://${username}:${password}@${hostname}/test?retryWrites=true&w=majority`
const client = await MongoClient.connect(url, { 
  useNewUrlParser: true, 
  useUnifiedTopology: true 
})

const db = client.db(database)
// Enter your target collection as a parameter to this step
this.res = await db.collection(params.collection).insertOne({ name: "Luke Skywalker" })

await client.close()