mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
19 lines
542 B
TypeScript
19 lines
542 B
TypeScript
import { assertEquals, assertExists } from "../deps.ts";
|
|
import { loadBot } from "../mod.ts";
|
|
import { CACHED_COMMUNITY_GUILD_ID } from "../utils.ts";
|
|
|
|
Deno.test({
|
|
name: "[channel] Get a channel",
|
|
async fn(t) {
|
|
const bot = loadBot();
|
|
const channel = await bot.helpers.createChannel(CACHED_COMMUNITY_GUILD_ID, {
|
|
name: "fetching",
|
|
});
|
|
|
|
const fetched = await bot.helpers.getChannel(channel.id);
|
|
assertExists(fetched);
|
|
assertEquals(channel.id, fetched.id);
|
|
assertEquals(channel.name, fetched.name);
|
|
},
|
|
});
|