feat(plugins): better typing (#2120)

This commit is contained in:
ITOH
2022-03-21 22:13:15 -04:00
committed by GitHub
parent 2644d4b171
commit c9a9cdc500
2 changed files with 11 additions and 11 deletions
@@ -4,10 +4,9 @@ import { requireBotChannelPermissions } from "../permissions.ts";
export default function editWebhook(bot: BotWithCache) {
const editWebhookOld = bot.helpers.editWebhook;
// @ts-ignore TODO: itoh need a better way for this
bot.helpers.editWebhook = async function (webhookId, options, channelId) {
bot.helpers.editWebhook = async function (webhookId, options, fromChannelId) {
if (options.channelId) requireBotChannelPermissions(bot, options.channelId, ["MANAGE_WEBHOOKS"]);
if (channelId) requireBotChannelPermissions(bot, channelId, ["MANAGE_WEBHOOKS"]);
if (fromChannelId) requireBotChannelPermissions(bot, fromChannelId, ["MANAGE_WEBHOOKS"]);
if (options.name) {
if (