mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
more fixxes
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
||||
import { assertEquals, assertExists } from "../deps.ts";
|
||||
import { cache } from "../../src/cache.ts";
|
||||
import { DiscordChannelTypes } from "../../src/types/channels/channel_types.ts";
|
||||
import { CreateGuildChannel } from "../../src/types/guilds/create_guild_channel.ts";
|
||||
import { createChannel } from "../../src/helpers/channels/create_channel.ts";
|
||||
import { delayUntil } from "../util/delay_until.ts";
|
||||
import { DiscordOverwriteTypes } from "../../src/types/channels/overwrite_types.ts";
|
||||
import { botId } from "../../src/bot.ts";
|
||||
import { cache } from "../../src/cache.ts";
|
||||
import { createChannel } from "../../src/helpers/channels/create_channel.ts";
|
||||
import { DiscordChannelTypes } from "../../src/types/channels/channel_types.ts";
|
||||
import { DiscordOverwriteTypes } from "../../src/types/channels/overwrite_types.ts";
|
||||
import { CreateGuildChannel } from "../../src/types/guilds/create_guild_channel.ts";
|
||||
import { assertEquals, assertExists } from "../deps.ts";
|
||||
import { delayUntil } from "../util/delay_until.ts";
|
||||
import { defaultTestOptions, tempData } from "../ws/start_bot.ts";
|
||||
|
||||
async function ifItFailsBlameWolf(options: CreateGuildChannel, save = false) {
|
||||
const channel = await createChannel(tempData.guildId, options);
|
||||
|
||||
// Assertions
|
||||
assertExists(channel);
|
||||
assertEquals(channel.type, options.type || DiscordChannelTypes.GUILD_TEXT);
|
||||
assertEquals(channel.type, options.type || DiscordChannelTypes.GuildText);
|
||||
|
||||
if (save) tempData.channelId = channel.id;
|
||||
|
||||
@@ -60,7 +60,7 @@ Deno.test({
|
||||
await ifItFailsBlameWolf(
|
||||
{
|
||||
name: "Discordeno-test",
|
||||
type: DiscordChannelTypes.GUILD_CATEGORY,
|
||||
type: DiscordChannelTypes.GuildCategory,
|
||||
},
|
||||
true,
|
||||
);
|
||||
@@ -90,7 +90,7 @@ Deno.test({
|
||||
await ifItFailsBlameWolf(
|
||||
{
|
||||
name: "Discordeno-test",
|
||||
type: DiscordChannelTypes.GUILD_VOICE,
|
||||
type: DiscordChannelTypes.GuildVoice,
|
||||
},
|
||||
true,
|
||||
);
|
||||
@@ -104,7 +104,7 @@ Deno.test({
|
||||
await ifItFailsBlameWolf(
|
||||
{
|
||||
name: "discordeno-test",
|
||||
type: DiscordChannelTypes.GUILD_VOICE,
|
||||
type: DiscordChannelTypes.GuildVoice,
|
||||
bitrate: 32000,
|
||||
},
|
||||
true,
|
||||
@@ -119,7 +119,7 @@ Deno.test({
|
||||
await ifItFailsBlameWolf(
|
||||
{
|
||||
name: "Discordeno-test",
|
||||
type: DiscordChannelTypes.GUILD_VOICE,
|
||||
type: DiscordChannelTypes.GuildVoice,
|
||||
userLimit: 32,
|
||||
},
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user