mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
13 lines
417 B
TypeScript
13 lines
417 B
TypeScript
import { BotWithCache } from "../../deps.ts";
|
|
import { requireBotChannelPermissions } from "../permissions.ts";
|
|
|
|
export default function deleteWebhook(bot: BotWithCache) {
|
|
const deleteWebhookOld = bot.helpers.deleteWebhook;
|
|
|
|
bot.helpers.deleteWebhook = function (channelId, options) {
|
|
requireBotChannelPermissions(bot, channelId, ["MANAGE_WEBHOOKS"]);
|
|
|
|
return deleteWebhookOld(channelId, options);
|
|
};
|
|
}
|