async
(params, auths) => {
}
// See https://discordapp.com/developers/docs/resources/user#get-current-user-guilds
return await require("@pipedreamhq/platform").axios(this, {
method: "GET",
url: `https://discordapp.com/api/users/@me/guilds`,
headers: {
"Authorization": `Bot ${auths.discord_bot.bot_token}`,
},
params: {
before: params.before,
after: params.after,
limit: params.limit,
}
})
async
(params, auths) => {
}
// See https://discordapp.com/developers/docs/resources/guild#modify-guild
return await require("@pipedreamhq/platform").axios(this, {
method: "PATCH",
url: `https://discordapp.com/api/guilds/${params.guild_id}`,
headers: {
"Authorization": `Bot ${auths.discord_bot.bot_token}`,
"Content-Type": "application/json",
},
data: {
name: params.name,
region: params.region,
verification_level: params.verification_level,
default_message_notifications: params.default_message_notifications,
explicit_content_filter: params.explicit_content_filter,
afk_channel_id: params.afk_channel_id,
afk_timeout: params.afk_timeout,
icon: params.icon,
owner_id: params.owner_id,
splash: params.splash,
banner: params.banner,
system_channel_id: params.system_channel_id,
}
})