mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
test: remove configs.ts (#1995)
* refactortests): remove config.ts * Update mod.ts * Update mod.ts * .env file
This commit is contained in:
@@ -9,3 +9,4 @@ export {
|
||||
} from "https://deno.land/std@0.115.1/testing/asserts.ts";
|
||||
export * from "https://deno.land/x/discordeno_cache_plugin@0.0.21/mod.ts";
|
||||
export * from "https://deno.land/x/discordeno_permissions_plugin@0.0.15/mod.ts";
|
||||
export { config as dotenv } from "https://deno.land/x/dotenv@v3.2.0/mod.ts";
|
||||
|
||||
+7
-5
@@ -1,6 +1,5 @@
|
||||
import { UNITTEST_TOKEN } from "../configs.ts";
|
||||
import { ChannelTypes, createBot, createEventHandlers, startBot } from "../mod.ts";
|
||||
import { assertEquals, assertExists, enableCachePlugin } from "./deps.ts";
|
||||
import { assertEquals, assertExists, dotenv, enableCachePlugin } from "./deps.ts";
|
||||
import { deleteMessageWithoutReasonTest, deleteMessageWithReasonTest } from "./helpers/messages/deleteMessage.ts";
|
||||
import { getMessagesTest } from "./helpers/messages/getMessages.ts";
|
||||
import { deleteMessagesWithoutReasonTest, deleteMessagesWithReasonTest } from "./helpers/messages/deleteMessages.ts";
|
||||
@@ -30,13 +29,16 @@ import { deleteChannelOverwriteTests } from "./helpers/channels/deleteChannelOve
|
||||
import { editChannelTests } from "./helpers/channels/editChannel.ts";
|
||||
import { CACHED_COMMUNITY_GUILD_ID, sanitizeMode } from "./constants.ts";
|
||||
|
||||
if (!UNITTEST_TOKEN) throw new Error("Token was not provided.");
|
||||
dotenv({ export: true });
|
||||
|
||||
const botId = BigInt(atob(UNITTEST_TOKEN.split(".")[0]));
|
||||
let TOKEN = Deno.env.get("DISCORD_TOKEN");
|
||||
if (!TOKEN) throw new Error("Token was not provided.");
|
||||
|
||||
const botId = BigInt(atob(TOKEN.split(".")[0]));
|
||||
|
||||
let startedAt = 0;
|
||||
const baseBot = createBot({
|
||||
token: UNITTEST_TOKEN,
|
||||
token: TOKEN,
|
||||
botId,
|
||||
events: createEventHandlers({
|
||||
ready: () => {
|
||||
|
||||
Reference in New Issue
Block a user