forked from cadence/out-of-your-element
m->d message editing deletion
This commit is contained in:
parent
621a22df01
commit
5bef9ebfe2
2 changed files with 21 additions and 2 deletions
|
@ -71,7 +71,20 @@ async function editMessageWithWebhook(channelID, messageID, data, threadID) {
|
|||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} channelID
|
||||
* @param {string} messageID
|
||||
* @param {string} [threadID]
|
||||
*/
|
||||
async function deleteMessageWithWebhook(channelID, messageID, threadID) {
|
||||
const result = await withWebhook(channelID, async webhook => {
|
||||
return discord.snow.webhook.deleteWebhookMessage(webhook.id, webhook.token, messageID, threadID)
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
module.exports.ensureWebhook = ensureWebhook
|
||||
module.exports.withWebhook = withWebhook
|
||||
module.exports.sendMessageWithWebhook = sendMessageWithWebhook
|
||||
module.exports.editMessageWithWebhook = editMessageWithWebhook
|
||||
module.exports.deleteMessageWithWebhook = deleteMessageWithWebhook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue