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

Method edit

components/runtime/src/ts/discord/webhook.ts:50–61  ·  view source on GitHub ↗
(fields: EditWebhookFields)

Source from the content-addressed store, hash-verified

48 }
49
50 edit(fields: EditWebhookFields) {
51 const currentGuildId = getCurrentGuildId()
52 if (this.guildId !== currentGuildId) {
53 if (!this.token) {
54 throw new Error("Can't edit webhooks for other guilds if no token is provided")
55 }
56
57 return editWebhookWithToken(this.id, this.token, fields)
58 } else {
59 return editWebhook(this.id, fields)
60 }
61 }
62
63 delete() {
64 const currentGuildId = getCurrentGuildId()

Callers 5

webhooks.tsFile · 0.45
archiveFunction · 0.45
unArchiveFunction · 0.45
lockFunction · 0.45
unlockFunction · 0.45

Calls 3

getCurrentGuildIdFunction · 0.90
editWebhookWithTokenFunction · 0.90
editWebhookFunction · 0.90

Tested by

no test coverage detected