fix: remove check on stage create

This commit is contained in:
Skillz4Killz
2021-12-04 16:22:33 +00:00
committed by GitHub
parent 59721b3d68
commit c697f2fd6a

View File

@@ -4,10 +4,6 @@ import { PrivacyLevel } from "../../types/channels/privacyLevel.ts";
/** Creates a new Stage instance associated to a Stage channel. Requires the user to be a moderator of the Stage channel. */
export async function createStageInstance(bot: Bot, channelId: bigint, topic: string, privacyLevel?: PrivacyLevel) {
if (!bot.utils.validateLength(topic, { max: 120, min: 1 })) {
throw new Error(bot.constants.Errors.INVALID_TOPIC_LENGTH);
}
const result = await bot.rest.runMethod<StageInstance>(bot.rest, "post", bot.constants.endpoints.STAGE_INSTANCES, {
channel_id: channelId.toString(),
topic,