mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 09:50:07 +00:00
* fix(plugins): await old function return * Update plugins/permissions/src/channels/stage.ts lol Co-authored-by: TriForMine <quentin.nicolini@hotmail.fr> Co-authored-by: TriForMine <quentin.nicolini@hotmail.fr>
16 lines
521 B
TypeScript
16 lines
521 B
TypeScript
import { BotWithCache } from "../../deps.ts";
|
|
import { requireBotChannelPermissions } from "../permissions.ts";
|
|
|
|
export default function getChannelWebhooks(bot: BotWithCache) {
|
|
const getChannelWebhooksOld = bot.helpers.getChannelWebhooks;
|
|
|
|
bot.helpers.getChannelWebhooks = async function (channelId) {
|
|
const channel = bot.channels.get(channelId);
|
|
if (channel?.guildId) {
|
|
requireBotChannelPermissions(bot, channelId, ["MANAGE_WEBHOOKS"]);
|
|
}
|
|
|
|
return await getChannelWebhooksOld(channelId);
|
|
};
|
|
}
|