refactor(plugins/permissions)!: rename createForumPosts to createForumPost (#2220)

* deno fmt

* fix: plugins/permissions: channels/forums/createForumPosts
This commit is contained in:
LTS20050703
2022-05-14 22:02:02 +02:00
committed by GitHub
parent ddc0c34ffc
commit 73e34b262d
2 changed files with 4 additions and 4 deletions
@@ -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);
@@ -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);