-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
template.ts
69 lines (66 loc) · 1.69 KB
/
template.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* Types extracted from https://discord.com/developers/docs/resources/template
*/
import type { APIUser } from './user.ts';
import type { Snowflake } from '../../globals.ts';
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v8/mod.ts';
/**
* https://discord.com/developers/docs/resources/template#template-object
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APITemplate {
/**
* The template code (unique ID)
*/
code: string;
/**
* Template name
*/
name: string;
/**
* The description for the template
*/
description: string | null;
/**
* Number of times this template has been used
*/
usage_count: number;
/**
* The ID of the user who created the template
*/
creator_id: Snowflake;
/**
* The user who created the template
*
* See https://discord.com/developers/docs/resources/user#user-object
*/
creator: APIUser;
/**
* When this template was created
*/
created_at: string;
/**
* When this template was last synced to the source guild
*/
updated_at: string;
/**
* The ID of the guild this template is based on
*/
source_guild_id: Snowflake;
/**
* The guild snapshot this template contains
*/
serialized_source_guild: APITemplateSerializedSourceGuild;
/**
* Whether the template has unsynced changes
*/
is_dirty: boolean | null;
}
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
description: string | null;
preferred_locale: string;
icon_hash: string | null;
}