mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
21 lines
592 B
TypeScript
21 lines
592 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);
|
|
|
|
await bot.helpers.deleteChannel(channel.id);
|
|
},
|
|
});
|