Use this app to interact with the Discord API using a bot in your account
Emit new event for each message posted to one or more channels
Emit new event when you add or modify a new row in a table. See the docs here
Emit new event when new rows are returned from a custom query. See the docs here
The Pipedream Discord app enables you to build event-driven workflows that interact with the Discord API. When you authorize the Pipedream app's access to your guilds, you can use Pipedream workflows to perform common Discord actions, or write your own code against the Discord API.
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}`,
},
})
},
})
MySQL is a powerful database management system used by some of the largest
organizations in the world, including Facebook, Google, and Amazon. MySQL is an
open-source relational database management system (RDBMS), as well as a popular
choice for web applications used by millions of websites.
Some applications that can be built using the MySQL API include:
import mysql from 'mysql2/promise';
export default defineComponent({
props: {
mysql: {
type: "app",
app: "mysql",
}
},
async run({steps, $}) {
const { host, port, username, password, database } = this.mysql.$auth
const connection = await mysql.createConnection({
host,
port,
user: username,
password,
database,
});
const [rows] = await connection.execute('SELECT NOW()');
return rows
},
})