Setu Recipes: reusable workflows across every app.Browse templates
Setuसेतु

Integrations / Discord

Discord

Community chat: read the connected profile and servers, and post to the channel the user chose.

4 actions OAuth 2 3 read1 write Calls discord.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "discord" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

ScopeWhy it is requested
identifyRead your Discord username and avatar
guildsSee which servers you are in
guilds.members.readRead your member profile inside a server
webhook.incomingPost messages to the one channel you choose

Actions

Get server memberreaddiscord.get_guild_memberGet the user's member profile in one server.

Needs scope: guilds.members.read

InputTypeDescription
guild_idstringRequired
TypeScript
await setu.execute({
  userId: "user_1",
  action: "discord.get_guild_member",
  input: {
    "guild_id": "<guild_id>"
  },
});
Get current userreaddiscord.get_meGet the connected Discord user's profile.

Needs scope: identify

No input.

TypeScript
await setu.execute({
  userId: "user_1",
  action: "discord.get_me",
  input: {},
});
List serversreaddiscord.list_guildsList the Discord servers the user belongs to.

Needs scope: guilds

No input.

TypeScript
await setu.execute({
  userId: "user_1",
  action: "discord.list_guilds",
  input: {},
});
Send messagewritediscord.send_messagePost a message to the Discord channel the user chose when connecting.

Needs scope: webhook.incoming

InputTypeDescription
contentstringRequiredMessage text, up to 2000 characters
usernamestringOptionalOptional display name for this message
TypeScript
await setu.execute({
  userId: "user_1",
  action: "discord.send_message",
  input: {
    "content": "<content>"
  },
});