Delete a Discord channel message
Deletes a message from a channel, for moderation and cleanup. This cannot be undone.
Deleting a message the bot did not send requires the bot to hold the Manage Messages permission, which the Zernio bot requests at install time. Deleting the bot's own message needs no extra permission.
Ownership is verified by resolving the channel's guild and confirming the caller owns a Discord account bound to it.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Discord channel snowflake ID
Discord message snowflake ID
Query Parameters
SocialAccount _id of the Discord account bound to this channel's guild
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.discord.deleteDiscordMessage({ path: { channelId: 'channel_abc123', messageId: 'message_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{
"success": true
}{
"error": "Unauthorized"
}Crosspost Discord message POST
Publishes a message from an announcement channel so it propagates to every server following that channel. The source channel must be an announcement channel. Calling this on a regular text channel returns a 400 before Discord is contacted, because Discord's own error for this case is opaque.
List Discord guild roles GET
Returns all roles in a Discord guild. Useful for building role-mention pickers, role-permission UIs, or finding the role ID before calling the role-assign endpoint. Roles are returned unordered — sort client-side by `position` if you need Discord's UI ordering. Caller must pass `accountId` of a Discord SocialAccount bound to this guild (route verifies team access + guild match).