Discord messaging and server actions for Weldable.
Part of the Weldable integration library — see @weldable/integration-core for the full catalog.
npm install @weldable/integration-discord @weldable/integration-core@weldable/integration-core is a peer dependency and must be installed alongside this package.
import integration from '@weldable/integration-discord'
// Send a message to a channel
const send = integration.actions.find(a => a.id === 'discord.send_message')!
const result = await send.execute(
{
channel_id: '1234567890123456789',
content: 'Deployment to production succeeded.',
},
ctx, // ActionContext from your Weldable-compatible host
)
console.log(result.id) // Discord message snowflake ID
// Read recent messages
const read = integration.actions.find(a => a.id === 'discord.read_messages')!
const messages = await read.execute(
{ channel_id: '1234567890123456789', limit: 10 },
ctx,
)See CONTRIBUTING.md in @weldable/integration-core for the development workflow and release process.
MIT