mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
getMembers test i hope
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
export const CACHED_COMMUNITY_GUILD_ID = 907350958810480671n;
|
||||
export const CACHED_COMMUNITY_GUILD_ID = 907350958810480671n; // revert back to 907350958810480671n when testing is finished
|
||||
|
||||
// CHANGE TO TRUE WHEN DEBUGGING SANITIZATION ERRORS
|
||||
export const sanitizeMode = {
|
||||
@@ -10,4 +10,4 @@ export const sanitizeMode = {
|
||||
// USED FOR ROLE CHANGE EVENTS
|
||||
export const roleChanges = new Map<bigint, bigint[]>();
|
||||
|
||||
export const banCounters = new Map<bigint, boolean>();
|
||||
export const banCounters = new Map<bigint, boolean>();
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { bot } from "../mod.ts";
|
||||
import { CACHED_COMMUNITY_GUILD_ID } from "../constants.ts";
|
||||
import { assertEquals } from "../deps.ts";
|
||||
|
||||
Deno.test("[member] Gets a member list and checks if the bot is in the member list", async () => {
|
||||
const members = await bot.helpers.getMembers(CACHED_COMMUNITY_GUILD_ID, { memberCount: 10 });
|
||||
assertEquals(members.has(bot.id), true);
|
||||
});
|
||||
+1
-1
@@ -86,7 +86,7 @@ if (bot.cache.guilds.size() <= 10) {
|
||||
await delayUntil(10000, () => Boolean(startedAt));
|
||||
|
||||
// CREATE ONE GUILD SO WE CAN REUSE LATER TO SAVE RATE LIMITS
|
||||
export const guild = await bot.helpers.createGuild({ name: "Discordeno Test" });
|
||||
export const guild = await bot.helpers.getGuild(CACHED_COMMUNITY_GUILD_ID);
|
||||
|
||||
// Assertions
|
||||
assertExists(guild);
|
||||
|
||||
Reference in New Issue
Block a user