MCPcopy Create free account
hub / github.com/Botloader/botloader / executeWebhook

Function executeWebhook

components/runtime/src/ts/discord/dapi.ts:1307–1320  ·  view source on GitHub ↗
(id: string, token: string, fields: CreateWebhookMessageFields)

Source from the content-addressed store, hash-verified

1305}
1306
1307export async function executeWebhook(id: string, token: string, fields: CreateWebhookMessageFields) {
1308 const message = await OpWrappers.callAsyncOp({
1309 kind: "discord_webhook_execute",
1310 arg: {
1311 webhook_id: id,
1312 token: token,
1313 avatar_url: fields.avatar_url ?? null,
1314 username: fields.username ?? null,
1315 fields: toOpMessageFields(fields),
1316 }
1317 })
1318
1319 return new Message(message)
1320}
1321
1322export async function getWebhookMessage(webhookId: string, token: string, messageId: string) {
1323 const message = await OpWrappers.callAsyncOp({

Callers 1

executeMethod · 0.90

Calls 1

toOpMessageFieldsFunction · 0.85

Tested by

no test coverage detected