tests: rate limit test (#2485)

* tests: rate limit test

* tests/misc: rateLimit.test promise.all
This commit is contained in:
LTS20050703
2022-09-24 00:04:04 +07:00
committed by GitHub
parent e4d66894e5
commit 19c89dd1c1

View File

@@ -0,0 +1,9 @@
import { loadBot } from "../mod.ts";
import { CACHED_COMMUNITY_GUILD_ID } from "../utils.ts";
Deno.test("[Misc] Rate Limit Test", async () => {
const bot = loadBot();
const channel = await bot.helpers.createChannel(CACHED_COMMUNITY_GUILD_ID);
await Promise.all(Array(10).map(() => bot.helpers.sendMessage(channel.id, { content: "Rate Limit Test" })));
await bot.helpers.deleteChannel(channel.id);
});