createDiscordClient
createDiscordClient(
opts?):object
Defined in: clients/discord-client/dist/index.d.mts:1083
Builds the webhook client: a webhooks group that reads, posts to and deletes messages from a webhook by its id and token.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
webhooks
Section titled “webhooks”webhooks:
object
webhooks.deleteMessage
Section titled “webhooks.deleteMessage”deleteMessage: (
id,token,messageId) =>Promise<void>
Parameters
Section titled “Parameters”string
string
messageId
Section titled “messageId”string
Returns
Section titled “Returns”Promise<void>
webhooks.editMessage
Section titled “webhooks.editMessage”editMessage: (
id,token,messageId,body) =>Promise<void>
Parameters
Section titled “Parameters”string
string
messageId
Section titled “messageId”string
number
Returns
Section titled “Returns”Promise<void>
webhooks.execute
Section titled “webhooks.execute”execute: (
id,token,content) =>Promise<void>
Parameters
Section titled “Parameters”string
string
content
Section titled “content”string
Returns
Section titled “Returns”Promise<void>
webhooks.executeAndWait
Section titled “webhooks.executeAndWait”executeAndWait: (
id,token,content,options?) =>Promise<{channel_id:string;id:string; }>
Parameters
Section titled “Parameters”string
string
content
Section titled “content”string
options?
Section titled “options?”suppressEmbeds?
Section titled “suppressEmbeds?”boolean
Returns
Section titled “Returns”Promise<{ channel_id: string; id: string; }>
webhooks.get
Section titled “webhooks.get”get: (
id,token) =>Promise<DiscordWebhookInfo>
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<DiscordWebhookInfo>