mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
feat(plugins): better typing (#2120)
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user