/[sudobot]/trunk/tests/mocks/client.mock.ts
ViewVC logotype

Contents of /trunk/tests/mocks/client.mock.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 620 byte(s)
chore: add trunk
1 import "reflect-metadata";
2
3 import Client from "@/core/Client";
4 import { ClientUser } from "discord.js";
5 import { randomSnowflake } from "./snowflakes";
6
7 export function createClient() {
8 const client = new Client({
9 intents: []
10 });
11
12 const id = randomSnowflake();
13
14 client.user = {
15 id,
16 username: "SudoBot",
17 discriminator: "0000",
18 tag: "SudoBot#0000",
19 avatar: "avatar",
20 bot: true,
21 system: false,
22 client,
23 toString() {
24 return `<@${id}>`;
25 }
26 } as unknown as ClientUser;
27
28 return client as Client<true>;
29 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26