1 |
rakinar2 |
575 |
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 |
|
|
} |