diff --git a/plugins/permissions/src/channels/forums/createForumPost.ts b/plugins/permissions/src/channels/forums/createForumPost.ts index 4ec6631f4..11d5182e0 100644 --- a/plugins/permissions/src/channels/forums/createForumPost.ts +++ b/plugins/permissions/src/channels/forums/createForumPost.ts @@ -2,13 +2,13 @@ import { BotWithCache } from "../../../deps.ts"; import { requireBotChannelPermissions } from "../../permissions.ts"; export default function createForumPosts(bot: BotWithCache) { - const createForumPostsOld = bot.helpers.createForumPosts; + const createForumPostsOld = bot.helpers.createForumPost; - bot.helpers.createForumPosts = async function (channelId, options) { + bot.helpers.createForumPost = async function (channelId, options) { const channel = bot.channels.get(channelId); if (channel) { - await requireBotChannelPermissions(bot, channel, ["SEND_MESSAGES"]); + requireBotChannelPermissions(bot, channel, ["SEND_MESSAGES"]); } return await createForumPostsOld(channelId, options); diff --git a/plugins/permissions/src/channels/forums/mod.ts b/plugins/permissions/src/channels/forums/mod.ts index afe6e08df..48daa34da 100644 --- a/plugins/permissions/src/channels/forums/mod.ts +++ b/plugins/permissions/src/channels/forums/mod.ts @@ -1,5 +1,5 @@ import { BotWithCache } from "../../../deps.ts"; -import { createForumPost } from "./createForumPost.ts"; +import createForumPost from "./createForumPost.ts"; export default function setupThreadPermChecks(bot: BotWithCache) { createForumPost(bot);