mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
refactor(plugins/permissions)!: rename createForumPosts to createForumPost (#2220)
* deno fmt * fix: plugins/permissions: channels/forums/createForumPosts
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user