summary refs log tree commit diff
path: root/src/schemas/responses/DiscoverableGuildsResponse.ts
blob: b091aaf114e7b961fdeff637ed74c918a523f6bc (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
	Copyright (C) 2023 Spacebar and Spacebar Contributors
	
	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU Affero General Public License as published
	by the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Affero General Public License for more details.
	
	You should have received a copy of the GNU Affero General Public License
	along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/

import { EmojiResponse, Snowflake, StickerResponse } from "@spacebar/schemas";

export interface DiscoverableGuildsResponse {
    total: number;
    guilds: DiscoverableGuild[];
    offset: number;
    limit: number;
}

export interface DiscoverableGuild {
    id: Snowflake;
    name: string;
    icon: string | null;
    description: string | null;
    banner: string | null;
    splash: string | null;
    discovery_splash: string | null;
    features: string[];
    vanity_url_code: string | null;
    preferred_locale: string;
    premium_subscription_count: number;
    approximate_member_count: number;
    approximate_presence_count: number;
    emojis?: EmojiResponse[];
    emoji_count?: number;
    stickers?: StickerResponse[];
    sticker_count?: number;
    auto_removed: boolean;
    primary_category_id: number;
    primary_category?: DiscoveryCategory;
    keywords: string[];
    is_published: boolean;
    reasons_to_join?: DiscoveryReason[];
    social_links?: string[];
    about?: string | null;
    category_ids?: Snowflake[];
    categories?: DiscoveryCategory[];
    created_at?: string;
    nsfw_properties?: DiscoveryNsfwProperties | null;
}

export interface DiscoveryCategory {
    id: number;
    name: string;
    is_primary: boolean;
}

export interface DiscoveryReason {
    reason: string;
    emoji_id?: Snowflake;
    emoji_name?: string;
}

export interface DiscoveryNsfwProperties {
    channels?: Snowflake[];
    channel_banned_keywords?: { [id: Snowflake]: string[] };
    name?: string;
    name_banned_keywords?: string[];
    description?: string;
    description_banned_keywords?: string[];
}