-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
52 lines (46 loc) · 961 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
declare module "react-discord-widget" {
interface Channel {
id: string,
name: string,
position: number,
}
interface Game {
name: string,
}
interface Member {
id: string,
username: string,
discriminator: string,
avatar: string | null,
status: string,
avatar_url: string,
game?: Game,
}
interface Server {
id: string,
name: string,
instant_invite: string,
channels: Channel[],
members: Member[],
}
type DiscordType = {
id: string,
delay?: number,
}
export type DiscordProps = {
id: string,
theme?: "light" | "dark",
delay?: number,
showJoinButton?: boolean,
height?: number,
}
export const useDiscord: (props: DiscordType) => {
isLoading: boolean,
error: any,
data: Server | null,
refetch: () => Promise<void>,
remove: () => void,
delay: number,
}
export const Discord = (props: DiscordProps) => JSX.Element;
}