dfx 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DiscordConfig/index.d.ts +40 -0
- package/dist/DiscordConfig/index.d.ts.map +1 -0
- package/dist/DiscordConfig/index.js +29 -0
- package/dist/DiscordConfig/index.js.map +1 -0
- package/dist/DiscordGateway/DiscordWS/index.d.ts +23 -0
- package/dist/DiscordGateway/DiscordWS/index.d.ts.map +1 -0
- package/dist/DiscordGateway/DiscordWS/index.js +25 -0
- package/dist/DiscordGateway/DiscordWS/index.js.map +1 -0
- package/dist/DiscordGateway/Shard/heartbeats.d.ts +3 -0
- package/dist/DiscordGateway/Shard/heartbeats.d.ts.map +1 -0
- package/dist/DiscordGateway/Shard/heartbeats.js +23 -0
- package/dist/DiscordGateway/Shard/heartbeats.js.map +1 -0
- package/dist/DiscordGateway/Shard/identify.d.ts +13 -0
- package/dist/DiscordGateway/Shard/identify.d.ts.map +1 -0
- package/dist/DiscordGateway/Shard/identify.js +30 -0
- package/dist/DiscordGateway/Shard/identify.js.map +1 -0
- package/dist/DiscordGateway/Shard/index.d.ts +9 -0
- package/dist/DiscordGateway/Shard/index.d.ts.map +1 -0
- package/dist/DiscordGateway/Shard/index.js +51 -0
- package/dist/DiscordGateway/Shard/index.js.map +1 -0
- package/dist/DiscordGateway/Shard/invalidSession.d.ts +3 -0
- package/dist/DiscordGateway/Shard/invalidSession.d.ts.map +1 -0
- package/dist/DiscordGateway/Shard/invalidSession.js +9 -0
- package/dist/DiscordGateway/Shard/invalidSession.js.map +1 -0
- package/dist/DiscordGateway/Shard/sendEvents.d.ts +8 -0
- package/dist/DiscordGateway/Shard/sendEvents.d.ts.map +1 -0
- package/dist/DiscordGateway/Shard/sendEvents.js +26 -0
- package/dist/DiscordGateway/Shard/sendEvents.js.map +1 -0
- package/dist/DiscordGateway/Shard/utils.d.ts +4 -0
- package/dist/DiscordGateway/Shard/utils.d.ts.map +1 -0
- package/dist/DiscordGateway/Shard/utils.js +9 -0
- package/dist/DiscordGateway/Shard/utils.js.map +1 -0
- package/dist/DiscordGateway/ShardStore/index.d.ts +13 -0
- package/dist/DiscordGateway/ShardStore/index.d.ts.map +1 -0
- package/dist/DiscordGateway/ShardStore/index.js +22 -0
- package/dist/DiscordGateway/ShardStore/index.js.map +1 -0
- package/dist/DiscordGateway/Sharder/index.d.ts +10 -0
- package/dist/DiscordGateway/Sharder/index.d.ts.map +1 -0
- package/dist/DiscordGateway/Sharder/index.js +60 -0
- package/dist/DiscordGateway/Sharder/index.js.map +1 -0
- package/dist/DiscordGateway/WS/index.d.ts +28 -0
- package/dist/DiscordGateway/WS/index.d.ts.map +1 -0
- package/dist/DiscordGateway/WS/index.js +82 -0
- package/dist/DiscordGateway/WS/index.js.map +1 -0
- package/dist/DiscordGateway/index.d.ts +21 -0
- package/dist/DiscordGateway/index.d.ts.map +1 -0
- package/dist/DiscordGateway/index.js +27 -0
- package/dist/DiscordGateway/index.js.map +1 -0
- package/dist/DiscordREST/index.d.ts +13 -0
- package/dist/DiscordREST/index.d.ts.map +1 -0
- package/dist/DiscordREST/index.js +85 -0
- package/dist/DiscordREST/index.js.map +1 -0
- package/dist/DiscordREST/types.d.ts +10 -0
- package/dist/DiscordREST/types.d.ts.map +1 -0
- package/dist/DiscordREST/types.js +2 -0
- package/{esm → dist}/DiscordREST/types.js.map +1 -1
- package/dist/DiscordREST/utils.d.ts +11 -0
- package/dist/DiscordREST/utils.d.ts.map +1 -0
- package/dist/DiscordREST/utils.js +22 -0
- package/dist/DiscordREST/utils.js.map +1 -0
- package/dist/Helpers/flags.d.ts +28 -0
- package/dist/Helpers/flags.d.ts.map +1 -0
- package/dist/Helpers/flags.js +36 -0
- package/dist/Helpers/flags.js.map +1 -0
- package/dist/Helpers/intents.d.ts +25 -0
- package/dist/Helpers/intents.d.ts.map +1 -0
- package/dist/Helpers/intents.js +28 -0
- package/dist/Helpers/intents.js.map +1 -0
- package/dist/Helpers/interactions.d.ts +74 -0
- package/dist/Helpers/interactions.d.ts.map +1 -0
- package/dist/Helpers/interactions.js +93 -0
- package/dist/Helpers/interactions.js.map +1 -0
- package/dist/Helpers/members.d.ts +10 -0
- package/dist/Helpers/members.d.ts.map +1 -0
- package/dist/Helpers/members.js +10 -0
- package/dist/Helpers/members.js.map +1 -0
- package/dist/Helpers/permissions.d.ts +35 -0
- package/dist/Helpers/permissions.d.ts.map +1 -0
- package/dist/Helpers/permissions.js +69 -0
- package/dist/Helpers/permissions.js.map +1 -0
- package/dist/Helpers/ui.d.ts +48 -0
- package/dist/Helpers/ui.d.ts.map +1 -0
- package/dist/Helpers/ui.js +67 -0
- package/dist/Helpers/ui.js.map +1 -0
- package/dist/Http/index.d.ts +31 -0
- package/dist/Http/index.d.ts.map +1 -0
- package/dist/Http/index.js +54 -0
- package/dist/Http/index.js.map +1 -0
- package/dist/Interactions/context.d.ts +29 -0
- package/dist/Interactions/context.d.ts.map +1 -0
- package/dist/Interactions/context.js +23 -0
- package/dist/Interactions/context.js.map +1 -0
- package/dist/Interactions/definitions.d.ts +55 -0
- package/dist/Interactions/definitions.d.ts.map +1 -0
- package/dist/Interactions/definitions.js +52 -0
- package/dist/Interactions/definitions.js.map +1 -0
- package/dist/Interactions/gateway.d.ts +6 -0
- package/dist/Interactions/gateway.d.ts.map +1 -0
- package/dist/Interactions/gateway.js +17 -0
- package/dist/Interactions/gateway.js.map +1 -0
- package/dist/Interactions/handlers.d.ts +9 -0
- package/dist/Interactions/handlers.d.ts.map +1 -0
- package/dist/Interactions/handlers.js +49 -0
- package/dist/Interactions/handlers.js.map +1 -0
- package/dist/Interactions/index.d.ts +20 -0
- package/dist/Interactions/index.d.ts.map +1 -0
- package/dist/Interactions/index.js +31 -0
- package/dist/Interactions/index.js.map +1 -0
- package/dist/Interactions/utils.d.ts +10 -0
- package/dist/Interactions/utils.d.ts.map +1 -0
- package/dist/Interactions/utils.js +20 -0
- package/dist/Interactions/utils.js.map +1 -0
- package/dist/Interactions/webhook.d.ts +18 -0
- package/dist/Interactions/webhook.d.ts.map +1 -0
- package/dist/Interactions/webhook.js +26 -0
- package/dist/Interactions/webhook.js.map +1 -0
- package/dist/Log/index.d.ts +13 -0
- package/dist/Log/index.d.ts.map +1 -0
- package/dist/Log/index.js +19 -0
- package/dist/Log/index.js.map +1 -0
- package/dist/RateLimitStore/index.d.ts +25 -0
- package/dist/RateLimitStore/index.d.ts.map +1 -0
- package/dist/RateLimitStore/index.js +24 -0
- package/dist/RateLimitStore/index.js.map +1 -0
- package/dist/RateLimitStore/memory.d.ts +3 -0
- package/dist/RateLimitStore/memory.d.ts.map +1 -0
- package/dist/RateLimitStore/memory.js +31 -0
- package/dist/RateLimitStore/memory.js.map +1 -0
- package/dist/RateLimitStore/utils.d.ts +3 -0
- package/dist/RateLimitStore/utils.d.ts.map +1 -0
- package/dist/RateLimitStore/utils.js +18 -0
- package/dist/RateLimitStore/utils.js.map +1 -0
- package/dist/common.d.ts +34 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +21 -0
- package/dist/common.js.map +1 -0
- package/dist/example.d.ts +2 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +47 -0
- package/dist/example.js.map +1 -0
- package/dist/global.d.ts +14 -0
- package/dist/global.d.ts.map +1 -0
- package/dist/global.js +2 -0
- package/dist/global.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/{types.d.ts → dist/types.d.ts} +1456 -825
- package/dist/types.d.ts.map +1 -0
- package/{esm → dist}/types.js +283 -46
- package/dist/types.js.map +1 -0
- package/dist/utils/effect.d.ts +3 -0
- package/dist/utils/effect.d.ts.map +1 -0
- package/dist/utils/effect.js +2 -0
- package/dist/utils/effect.js.map +1 -0
- package/dist/utils/tsplus.d.ts +14 -0
- package/dist/utils/tsplus.d.ts.map +1 -0
- package/dist/utils/tsplus.js +2 -0
- package/dist/utils/tsplus.js.map +1 -0
- package/package.json +36 -51
- package/src/DiscordConfig/index.ts +52 -0
- package/src/DiscordGateway/DiscordWS/index.ts +50 -0
- package/src/DiscordGateway/Shard/heartbeats.ts +39 -0
- package/src/DiscordGateway/Shard/identify.ts +61 -0
- package/src/DiscordGateway/Shard/index.ts +90 -0
- package/src/DiscordGateway/Shard/invalidSession.ts +11 -0
- package/src/DiscordGateway/Shard/sendEvents.ts +35 -0
- package/src/DiscordGateway/Shard/utils.ts +14 -0
- package/src/DiscordGateway/ShardStore/index.ts +33 -0
- package/src/DiscordGateway/Sharder/index.ts +95 -0
- package/src/DiscordGateway/WS/index.ts +99 -0
- package/src/DiscordGateway/index.ts +55 -0
- package/src/DiscordREST/index.ts +132 -0
- package/src/DiscordREST/types.ts +14 -0
- package/src/DiscordREST/utils.ts +35 -0
- package/src/Helpers/flags.ts +68 -0
- package/src/Helpers/intents.ts +32 -0
- package/src/Helpers/interactions.ts +180 -0
- package/src/Helpers/members.ts +14 -0
- package/src/Helpers/permissions.ts +102 -0
- package/src/Helpers/ui.ts +103 -0
- package/src/Http/index.ts +65 -0
- package/src/Interactions/context.ts +76 -0
- package/src/Interactions/definitions.ts +124 -0
- package/src/Interactions/gateway.ts +44 -0
- package/src/Interactions/handlers.ts +139 -0
- package/src/Interactions/index.ts +57 -0
- package/src/Interactions/utils.ts +47 -0
- package/src/Interactions/webhook.ts +59 -0
- package/src/Log/index.ts +23 -0
- package/src/RateLimitStore/index.ts +65 -0
- package/src/RateLimitStore/memory.ts +48 -0
- package/src/RateLimitStore/utils.ts +27 -0
- package/src/common.ts +35 -0
- package/src/example.ts +52 -0
- package/src/global.ts +50 -0
- package/src/index.ts +45 -0
- package/src/json.d.ts +1 -0
- package/{types.ts → src/types.ts} +1616 -876
- package/src/utils/effect.ts +7 -0
- package/src/utils/tsplus.ts +11 -0
- package/DiscordConfig/index.d.ts +0 -29
- package/DiscordConfig/index.js +0 -31
- package/DiscordConfig/index.js.map +0 -1
- package/DiscordConfig/index.ts +0 -45
- package/DiscordGateway/index.d.ts +0 -23
- package/DiscordGateway/index.js +0 -25
- package/DiscordGateway/index.js.map +0 -1
- package/DiscordGateway/index.ts +0 -34
- package/DiscordGateway/utils.d.ts +0 -3
- package/DiscordGateway/utils.js +0 -12
- package/DiscordGateway/utils.js.map +0 -1
- package/DiscordGateway/utils.ts +0 -17
- package/DiscordREST/http.d.ts +0 -3
- package/DiscordREST/http.js +0 -20
- package/DiscordREST/http.js.map +0 -1
- package/DiscordREST/http.ts +0 -21
- package/DiscordREST/index.d.ts +0 -15
- package/DiscordREST/index.js +0 -63
- package/DiscordREST/index.js.map +0 -1
- package/DiscordREST/index.ts +0 -79
- package/DiscordREST/types.d.ts +0 -14
- package/DiscordREST/types.js +0 -6
- package/DiscordREST/types.js.map +0 -1
- package/DiscordREST/types.ts +0 -15
- package/DiscordShard/commands.d.ts +0 -7
- package/DiscordShard/commands.js +0 -38
- package/DiscordShard/commands.js.map +0 -1
- package/DiscordShard/commands.ts +0 -40
- package/DiscordShard/heartbeats.d.ts +0 -6
- package/DiscordShard/heartbeats.js +0 -29
- package/DiscordShard/heartbeats.js.map +0 -1
- package/DiscordShard/heartbeats.ts +0 -65
- package/DiscordShard/identify.d.ts +0 -15
- package/DiscordShard/identify.js +0 -35
- package/DiscordShard/identify.js.map +0 -1
- package/DiscordShard/identify.ts +0 -75
- package/DiscordShard/index.d.ts +0 -32
- package/DiscordShard/index.js +0 -63
- package/DiscordShard/index.js.map +0 -1
- package/DiscordShard/index.ts +0 -122
- package/DiscordShard/invalidSession.d.ts +0 -6
- package/DiscordShard/invalidSession.js +0 -17
- package/DiscordShard/invalidSession.js.map +0 -1
- package/DiscordShard/invalidSession.ts +0 -24
- package/DiscordShard/utils.d.ts +0 -7
- package/DiscordShard/utils.js +0 -17
- package/DiscordShard/utils.js.map +0 -1
- package/DiscordShard/utils.ts +0 -32
- package/DiscordWS/index.d.ts +0 -36
- package/DiscordWS/index.js +0 -39
- package/DiscordWS/index.js.map +0 -1
- package/DiscordWS/index.ts +0 -82
- package/Log/index.d.ts +0 -15
- package/Log/index.js +0 -28
- package/Log/index.js.map +0 -1
- package/Log/index.ts +0 -30
- package/Utils/memoize.d.ts +0 -3
- package/Utils/memoize.js +0 -16
- package/Utils/memoize.js.map +0 -1
- package/Utils/memoize.ts +0 -15
- package/WS/index.d.ts +0 -30
- package/WS/index.js +0 -70
- package/WS/index.js.map +0 -1
- package/WS/index.ts +0 -113
- package/bot.d.ts +0 -1
- package/bot.js +0 -28
- package/bot.js.map +0 -1
- package/bot.ts +0 -48
- package/esm/DiscordConfig/index.js +0 -26
- package/esm/DiscordConfig/index.js.map +0 -1
- package/esm/DiscordGateway/index.js +0 -20
- package/esm/DiscordGateway/index.js.map +0 -1
- package/esm/DiscordGateway/utils.js +0 -7
- package/esm/DiscordGateway/utils.js.map +0 -1
- package/esm/DiscordREST/http.js +0 -15
- package/esm/DiscordREST/http.js.map +0 -1
- package/esm/DiscordREST/index.js +0 -59
- package/esm/DiscordREST/index.js.map +0 -1
- package/esm/DiscordREST/types.js +0 -3
- package/esm/DiscordShard/commands.js +0 -28
- package/esm/DiscordShard/commands.js.map +0 -1
- package/esm/DiscordShard/heartbeats.js +0 -24
- package/esm/DiscordShard/heartbeats.js.map +0 -1
- package/esm/DiscordShard/identify.js +0 -30
- package/esm/DiscordShard/identify.js.map +0 -1
- package/esm/DiscordShard/index.js +0 -58
- package/esm/DiscordShard/index.js.map +0 -1
- package/esm/DiscordShard/invalidSession.js +0 -12
- package/esm/DiscordShard/invalidSession.js.map +0 -1
- package/esm/DiscordShard/utils.js +0 -11
- package/esm/DiscordShard/utils.js.map +0 -1
- package/esm/DiscordWS/index.js +0 -34
- package/esm/DiscordWS/index.js.map +0 -1
- package/esm/Log/index.js +0 -22
- package/esm/Log/index.js.map +0 -1
- package/esm/Utils/memoize.js +0 -12
- package/esm/Utils/memoize.js.map +0 -1
- package/esm/WS/index.js +0 -65
- package/esm/WS/index.js.map +0 -1
- package/esm/bot.js +0 -25
- package/esm/bot.js.map +0 -1
- package/esm/mod.js +0 -16
- package/esm/mod.js.map +0 -1
- package/esm/types.js.map +0 -1
- package/mod.d.ts +0 -7
- package/mod.js +0 -25
- package/mod.js.map +0 -1
- package/mod.ts +0 -19
- package/types.js +0 -1564
- package/types.js.map +0 -1
|
@@ -1,64 +1,78 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RestResponse } from "dfx/DiscordREST/types"
|
|
2
|
+
export interface ActionMetadatum {
|
|
3
|
+
/** SEND_ALERT_MESSAGE */
|
|
4
|
+
channel_id: Snowflake
|
|
5
|
+
/** TIMEOUT */
|
|
6
|
+
duration_seconds: number
|
|
7
|
+
}
|
|
2
8
|
export interface ActionRow {
|
|
3
9
|
/** component type */
|
|
4
10
|
type: ComponentType
|
|
5
11
|
/** a list of child components */
|
|
6
12
|
components: Component[]
|
|
7
13
|
}
|
|
14
|
+
export enum ActionType {
|
|
15
|
+
/** blocks the content of a message according to the rule */
|
|
16
|
+
BLOCK_MESSAGE = 1,
|
|
17
|
+
/** logs user content to a specified channel */
|
|
18
|
+
SEND_ALERT_MESSAGE = 2,
|
|
19
|
+
/** timeout user for a specified duration * */
|
|
20
|
+
TIMEOUT = 3,
|
|
21
|
+
}
|
|
8
22
|
export interface Activity {
|
|
9
|
-
/**
|
|
23
|
+
/** Activity's name */
|
|
10
24
|
name: string
|
|
11
|
-
/**
|
|
25
|
+
/** Activity type */
|
|
12
26
|
type: ActivityType
|
|
13
|
-
/**
|
|
27
|
+
/** Stream URL, is validated when type is 1 */
|
|
14
28
|
url?: string | null
|
|
15
|
-
/**
|
|
29
|
+
/** Unix timestamp (in milliseconds) of when the activity was added to the user's session */
|
|
16
30
|
created_at: number
|
|
17
|
-
/**
|
|
31
|
+
/** Unix timestamps for start and/or end of the game */
|
|
18
32
|
timestamps?: ActivityTimestamp
|
|
19
|
-
/**
|
|
33
|
+
/** Application ID for the game */
|
|
20
34
|
application_id?: Snowflake
|
|
21
|
-
/**
|
|
35
|
+
/** What the player is currently doing */
|
|
22
36
|
details?: string | null
|
|
23
|
-
/**
|
|
37
|
+
/** User's current party status */
|
|
24
38
|
state?: string | null
|
|
25
|
-
/**
|
|
39
|
+
/** Emoji used for a custom status */
|
|
26
40
|
emoji?: ActivityEmoji | null
|
|
27
|
-
/**
|
|
41
|
+
/** Information for the current party of the player */
|
|
28
42
|
party?: ActivityParty
|
|
29
|
-
/**
|
|
43
|
+
/** Images for the presence and their hover texts */
|
|
30
44
|
assets?: ActivityAsset
|
|
31
|
-
/**
|
|
45
|
+
/** Secrets for Rich Presence joining and spectating */
|
|
32
46
|
secrets?: ActivitySecret
|
|
33
|
-
/**
|
|
47
|
+
/** Whether or not the activity is an instanced game session */
|
|
34
48
|
instance?: boolean
|
|
35
|
-
/**
|
|
49
|
+
/** Activity flags ORd together, describes what the payload includes */
|
|
36
50
|
flags?: number
|
|
37
|
-
/**
|
|
51
|
+
/** Custom buttons shown in the Rich Presence (max 2) */
|
|
38
52
|
buttons?: ActivityButton[]
|
|
39
53
|
}
|
|
40
54
|
export interface ActivityAsset {
|
|
41
|
-
/**
|
|
55
|
+
/** See Activity Asset Image */
|
|
42
56
|
large_image?: string
|
|
43
|
-
/**
|
|
57
|
+
/** Text displayed when hovering over the large image of the activity */
|
|
44
58
|
large_text?: string
|
|
45
|
-
/**
|
|
59
|
+
/** See Activity Asset Image */
|
|
46
60
|
small_image?: string
|
|
47
|
-
/**
|
|
61
|
+
/** Text displayed when hovering over the small image of the activity */
|
|
48
62
|
small_text?: string
|
|
49
63
|
}
|
|
50
64
|
export interface ActivityButton {
|
|
51
|
-
/**
|
|
65
|
+
/** Text shown on the button (1-32 characters) */
|
|
52
66
|
label: string
|
|
53
|
-
/**
|
|
67
|
+
/** URL opened when clicking the button (1-512 characters) */
|
|
54
68
|
url: string
|
|
55
69
|
}
|
|
56
70
|
export interface ActivityEmoji {
|
|
57
|
-
/**
|
|
71
|
+
/** Name of the emoji */
|
|
58
72
|
name: string
|
|
59
|
-
/**
|
|
73
|
+
/** ID of the emoji */
|
|
60
74
|
id?: Snowflake
|
|
61
|
-
/**
|
|
75
|
+
/** Whether the emoji is animated */
|
|
62
76
|
animated?: boolean
|
|
63
77
|
}
|
|
64
78
|
export const ActivityFlag = {
|
|
@@ -73,23 +87,23 @@ export const ActivityFlag = {
|
|
|
73
87
|
EMBEDDED: 1 << 8,
|
|
74
88
|
} as const
|
|
75
89
|
export interface ActivityParty {
|
|
76
|
-
/**
|
|
90
|
+
/** ID of the party */
|
|
77
91
|
id?: string
|
|
78
|
-
/**
|
|
92
|
+
/** Used to show the party's current and maximum size */
|
|
79
93
|
size?: number[]
|
|
80
94
|
}
|
|
81
95
|
export interface ActivitySecret {
|
|
82
|
-
/**
|
|
96
|
+
/** Secret for joining a party */
|
|
83
97
|
join?: string
|
|
84
|
-
/**
|
|
98
|
+
/** Secret for spectating a game */
|
|
85
99
|
spectate?: string
|
|
86
|
-
/**
|
|
100
|
+
/** Secret for a specific instanced match */
|
|
87
101
|
match?: string
|
|
88
102
|
}
|
|
89
103
|
export interface ActivityTimestamp {
|
|
90
|
-
/**
|
|
104
|
+
/** Unix time (in milliseconds) of when the activity started */
|
|
91
105
|
start?: number
|
|
92
|
-
/**
|
|
106
|
+
/** Unix time (in milliseconds) of when the activity ends */
|
|
93
107
|
end?: number
|
|
94
108
|
}
|
|
95
109
|
export enum ActivityType {
|
|
@@ -151,7 +165,7 @@ export interface Application {
|
|
|
151
165
|
privacy_policy_url?: string
|
|
152
166
|
/** partial user object containing info on the owner of the application */
|
|
153
167
|
owner?: User
|
|
154
|
-
/**
|
|
168
|
+
/** deprecated and will be removed in v11. An empty string. */
|
|
155
169
|
summary: string
|
|
156
170
|
/** the hex encoded key for verification in interactions and the GameSDK's GetTicket */
|
|
157
171
|
verify_key: string
|
|
@@ -167,65 +181,105 @@ export interface Application {
|
|
|
167
181
|
cover_image?: string
|
|
168
182
|
/** the application's public flags */
|
|
169
183
|
flags?: number
|
|
184
|
+
/** up to 5 tags describing the content and functionality of the application */
|
|
185
|
+
tags?: string[]
|
|
186
|
+
/** settings for the application's default in-app authorization link, if enabled */
|
|
187
|
+
install_params?: InstallParam
|
|
188
|
+
/** the application's default custom authorization link, if enabled */
|
|
189
|
+
custom_install_url?: string
|
|
170
190
|
}
|
|
171
191
|
export interface ApplicationCommand {
|
|
172
|
-
/**
|
|
192
|
+
/** Unique ID of command */
|
|
173
193
|
id: Snowflake
|
|
174
|
-
/**
|
|
194
|
+
/** Type of command, defaults to 1 */
|
|
175
195
|
type?: ApplicationCommandType
|
|
176
|
-
/**
|
|
196
|
+
/** ID of the parent application */
|
|
177
197
|
application_id: Snowflake
|
|
178
198
|
/** guild id of the command, if not global */
|
|
179
199
|
guild_id?: Snowflake
|
|
180
|
-
/** 1-32
|
|
200
|
+
/** Name of command, 1-32 characters */
|
|
181
201
|
name: string
|
|
182
|
-
/**
|
|
202
|
+
/** Localization dictionary for name field. Values follow the same restrictions as name */
|
|
203
|
+
name_localizations?: Locale | null
|
|
204
|
+
/** Description for CHAT_INPUT commands, 1-100 characters. Empty string for USER and MESSAGE commands */
|
|
183
205
|
description: string
|
|
184
|
-
/**
|
|
206
|
+
/** Localization dictionary for description field. Values follow the same restrictions as description */
|
|
207
|
+
description_localizations?: Locale | null
|
|
208
|
+
/** Parameters for the command, max of 25 */
|
|
185
209
|
options?: ApplicationCommandOption[]
|
|
186
|
-
/**
|
|
187
|
-
|
|
188
|
-
/**
|
|
210
|
+
/** Set of permissions represented as a bit set */
|
|
211
|
+
default_member_permissions?: string | null
|
|
212
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
213
|
+
dm_permission?: boolean
|
|
214
|
+
/** Not recommended for use as field will soon be deprecated. Indicates whether the command is enabled by default when the app is added to a guild, defaults to true */
|
|
215
|
+
default_permission?: boolean | null
|
|
216
|
+
/** Autoincrementing version identifier updated during substantial record changes */
|
|
189
217
|
version: Snowflake
|
|
190
218
|
}
|
|
219
|
+
export interface ApplicationCommandDatum {
|
|
220
|
+
/** the ID of the invoked command */
|
|
221
|
+
id: Snowflake
|
|
222
|
+
/** the name of the invoked command */
|
|
223
|
+
name: string
|
|
224
|
+
/** the type of the invoked command */
|
|
225
|
+
type: number
|
|
226
|
+
/** converted users + roles + channels + attachments */
|
|
227
|
+
resolved?: ResolvedDatum
|
|
228
|
+
/** the params + values from the user */
|
|
229
|
+
options?: ApplicationCommandInteractionDataOption[]
|
|
230
|
+
/** the id of the guild the command is registered to */
|
|
231
|
+
guild_id?: Snowflake
|
|
232
|
+
/** id of the user or message targeted by a user or message command */
|
|
233
|
+
target_id?: Snowflake
|
|
234
|
+
}
|
|
191
235
|
export interface ApplicationCommandInteractionDataOption {
|
|
192
|
-
/**
|
|
236
|
+
/** Name of the parameter */
|
|
193
237
|
name: string
|
|
194
|
-
/**
|
|
238
|
+
/** Value of application command option type */
|
|
195
239
|
type: ApplicationCommandOptionType
|
|
196
|
-
/**
|
|
240
|
+
/** Value of the option resulting from user input */
|
|
197
241
|
value?: string
|
|
198
|
-
/**
|
|
242
|
+
/** Present if this option is a group or subcommand */
|
|
199
243
|
options?: ApplicationCommandInteractionDataOption[]
|
|
200
244
|
/** true if this option is the currently focused option for autocomplete */
|
|
201
245
|
focused?: boolean
|
|
202
246
|
}
|
|
203
247
|
export interface ApplicationCommandOption {
|
|
204
|
-
/**
|
|
248
|
+
/** Type of option */
|
|
205
249
|
type: any
|
|
206
250
|
/** 1-32 character name */
|
|
207
251
|
name: string
|
|
252
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
253
|
+
name_localizations?: Locale | null
|
|
208
254
|
/** 1-100 character description */
|
|
209
255
|
description: string
|
|
210
|
-
/**
|
|
256
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
257
|
+
description_localizations?: Locale | null
|
|
258
|
+
/** If the parameter is required or optional--default false */
|
|
211
259
|
required?: boolean
|
|
212
|
-
/**
|
|
260
|
+
/** Choices for STRING, INTEGER, and NUMBER types for the user to pick from, max 25 */
|
|
213
261
|
choices?: ApplicationCommandOptionChoice[]
|
|
214
|
-
/**
|
|
262
|
+
/** If the option is a subcommand or subcommand group type, these nested options will be the parameters */
|
|
215
263
|
options?: ApplicationCommandOption[]
|
|
216
|
-
/**
|
|
264
|
+
/** If the option is a channel type, the channels shown will be restricted to these types */
|
|
217
265
|
channel_types?: ChannelType[]
|
|
218
|
-
/**
|
|
266
|
+
/** If the option is an INTEGER or NUMBER type, the minimum value permitted */
|
|
219
267
|
min_value?: number
|
|
220
|
-
/**
|
|
268
|
+
/** If the option is an INTEGER or NUMBER type, the maximum value permitted */
|
|
221
269
|
max_value?: number
|
|
222
|
-
/**
|
|
270
|
+
/** For option type STRING, the minimum allowed length (minimum of 0, maximum of 6000) */
|
|
271
|
+
min_length?: number
|
|
272
|
+
/** For option type STRING, the maximum allowed length (minimum of 1, maximum of 6000) */
|
|
273
|
+
max_length?: number
|
|
274
|
+
/** If autocomplete interactions are enabled for this STRING, INTEGER, or NUMBER type option */
|
|
223
275
|
autocomplete?: boolean
|
|
224
276
|
}
|
|
225
277
|
export interface ApplicationCommandOptionChoice {
|
|
226
278
|
/** 1-100 character choice name */
|
|
227
279
|
name: string
|
|
228
|
-
/**
|
|
280
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
281
|
+
name_localizations?: Locale | null
|
|
282
|
+
/** Value for the choice, up to 100 characters if string */
|
|
229
283
|
value: string
|
|
230
284
|
}
|
|
231
285
|
export enum ApplicationCommandOptionType {
|
|
@@ -242,16 +296,19 @@ export enum ApplicationCommandOptionType {
|
|
|
242
296
|
ATTACHMENT = 11,
|
|
243
297
|
}
|
|
244
298
|
export interface ApplicationCommandPermission {
|
|
245
|
-
/**
|
|
299
|
+
/** ID of the role, user, or channel. It can also be a permission constant */
|
|
246
300
|
id: Snowflake
|
|
247
|
-
/** role
|
|
301
|
+
/** role (1), user (2), or channel (3) */
|
|
248
302
|
type: ApplicationCommandPermissionType
|
|
249
303
|
/** true to allow, false, to disallow */
|
|
250
304
|
permission: boolean
|
|
251
305
|
}
|
|
306
|
+
export type ApplicationCommandPermissionsUpdateEvent =
|
|
307
|
+
GuildApplicationCommandPermission
|
|
252
308
|
export enum ApplicationCommandPermissionType {
|
|
253
309
|
ROLE = 1,
|
|
254
310
|
USER = 2,
|
|
311
|
+
CHANNEL = 3,
|
|
255
312
|
}
|
|
256
313
|
export enum ApplicationCommandType {
|
|
257
314
|
/** Slash commands; a text-based command that shows up when a user types / */
|
|
@@ -278,13 +335,15 @@ export const ApplicationFlag = {
|
|
|
278
335
|
GATEWAY_MESSAGE_CONTENT: 1 << 18,
|
|
279
336
|
/** Intent required for bots in under 100 servers to receive message content, found in Bot Settings */
|
|
280
337
|
GATEWAY_MESSAGE_CONTENT_LIMITED: 1 << 19,
|
|
338
|
+
/** Indicates if an app has registered global application commands */
|
|
339
|
+
APPLICATION_COMMAND_BADGE: 1 << 23,
|
|
281
340
|
} as const
|
|
282
341
|
export interface Attachment {
|
|
283
342
|
/** attachment id */
|
|
284
343
|
id: Snowflake
|
|
285
344
|
/** name of file attached */
|
|
286
345
|
filename: string
|
|
287
|
-
/** description for the file */
|
|
346
|
+
/** description for the file (max 1024 characters) */
|
|
288
347
|
description?: string
|
|
289
348
|
/** the attachment's media type */
|
|
290
349
|
content_type?: string
|
|
@@ -302,110 +361,238 @@ export interface Attachment {
|
|
|
302
361
|
ephemeral?: boolean
|
|
303
362
|
}
|
|
304
363
|
export interface AuditEntryInfo {
|
|
305
|
-
/**
|
|
364
|
+
/** ID of the app whose permissions were targeted */
|
|
365
|
+
application_id: Snowflake
|
|
366
|
+
/** Name of the Auto Moderation rule that was triggered */
|
|
367
|
+
auto_moderation_rule_name: string
|
|
368
|
+
/** Trigger type of the Auto Moderation rule that was triggered */
|
|
369
|
+
auto_moderation_rule_trigger_type: string
|
|
370
|
+
/** Channel in which the entities were targeted */
|
|
306
371
|
channel_id: Snowflake
|
|
307
|
-
/**
|
|
372
|
+
/** Number of entities that were targeted */
|
|
308
373
|
count: string
|
|
309
|
-
/**
|
|
374
|
+
/** Number of days after which inactive members were kicked */
|
|
310
375
|
delete_member_days: string
|
|
311
|
-
/**
|
|
376
|
+
/** ID of the overwritten entity */
|
|
312
377
|
id: Snowflake
|
|
313
|
-
/**
|
|
378
|
+
/** Number of members removed by the prune */
|
|
314
379
|
members_removed: string
|
|
315
|
-
/**
|
|
380
|
+
/** ID of the message that was targeted */
|
|
316
381
|
message_id: Snowflake
|
|
317
|
-
/**
|
|
382
|
+
/** Name of the role if type is "0" (not present if type is "1") */
|
|
318
383
|
role_name: string
|
|
319
|
-
/**
|
|
384
|
+
/** Type of overwritten entity - role ("0") or member ("1") */
|
|
320
385
|
type: string
|
|
321
386
|
}
|
|
322
387
|
export interface AuditLog {
|
|
323
|
-
/**
|
|
388
|
+
/** List of application commands referenced in the audit log */
|
|
389
|
+
application_commands: ApplicationCommand[]
|
|
390
|
+
/** List of audit log entries, sorted from most to least recent */
|
|
324
391
|
audit_log_entries: AuditLogEntry[]
|
|
325
|
-
/**
|
|
392
|
+
/** List of auto moderation rules referenced in the audit log */
|
|
393
|
+
auto_moderation_rules: AutoModerationRule[]
|
|
394
|
+
/** List of guild scheduled events referenced in the audit log */
|
|
326
395
|
guild_scheduled_events: GuildScheduledEvent[]
|
|
327
|
-
/**
|
|
396
|
+
/** List of partial integration objects */
|
|
328
397
|
integrations: Integration[]
|
|
329
|
-
/**
|
|
398
|
+
/** List of threads referenced in the audit log* */
|
|
330
399
|
threads: Channel[]
|
|
331
|
-
/**
|
|
400
|
+
/** List of users referenced in the audit log */
|
|
332
401
|
users: User[]
|
|
333
|
-
/**
|
|
402
|
+
/** List of webhooks referenced in the audit log */
|
|
334
403
|
webhooks: Webhook[]
|
|
335
404
|
}
|
|
336
405
|
export interface AuditLogChange {
|
|
337
|
-
/**
|
|
406
|
+
/** New value of the key */
|
|
338
407
|
new_value?: any
|
|
339
|
-
/**
|
|
408
|
+
/** Old value of the key */
|
|
340
409
|
old_value?: any
|
|
341
|
-
/**
|
|
410
|
+
/** Name of the changed entity, with a few exceptions */
|
|
342
411
|
key: string
|
|
343
412
|
}
|
|
344
413
|
export interface AuditLogEntry {
|
|
345
|
-
/**
|
|
414
|
+
/** ID of the affected entity (webhook, user, role, etc.) */
|
|
346
415
|
target_id?: string | null
|
|
347
|
-
/**
|
|
416
|
+
/** Changes made to the target_id */
|
|
348
417
|
changes?: AuditLogChange[]
|
|
349
|
-
/**
|
|
418
|
+
/** User or app that made the changes */
|
|
350
419
|
user_id?: Snowflake | null
|
|
351
|
-
/**
|
|
420
|
+
/** ID of the entry */
|
|
352
421
|
id: Snowflake
|
|
353
|
-
/**
|
|
422
|
+
/** Type of action that occurred */
|
|
354
423
|
action_type: AuditLogEvent
|
|
355
|
-
/**
|
|
424
|
+
/** Additional info for certain event types */
|
|
356
425
|
options?: AuditEntryInfo
|
|
357
|
-
/**
|
|
426
|
+
/** Reason for the change (1-512 characters) */
|
|
358
427
|
reason?: string
|
|
359
428
|
}
|
|
360
429
|
export enum AuditLogEvent {
|
|
430
|
+
/** Server settings were updated */
|
|
361
431
|
GUILD_UPDATE = 1,
|
|
432
|
+
/** Channel was created */
|
|
362
433
|
CHANNEL_CREATE = 10,
|
|
434
|
+
/** Channel settings were updated */
|
|
363
435
|
CHANNEL_UPDATE = 11,
|
|
436
|
+
/** Channel was deleted */
|
|
364
437
|
CHANNEL_DELETE = 12,
|
|
438
|
+
/** Permission overwrite was added to a channel */
|
|
365
439
|
CHANNEL_OVERWRITE_CREATE = 13,
|
|
440
|
+
/** Permission overwrite was updated for a channel */
|
|
366
441
|
CHANNEL_OVERWRITE_UPDATE = 14,
|
|
442
|
+
/** Permission overwrite was deleted from a channel */
|
|
367
443
|
CHANNEL_OVERWRITE_DELETE = 15,
|
|
444
|
+
/** Member was removed from server */
|
|
368
445
|
MEMBER_KICK = 20,
|
|
446
|
+
/** Members were pruned from server */
|
|
369
447
|
MEMBER_PRUNE = 21,
|
|
448
|
+
/** Member was banned from server */
|
|
370
449
|
MEMBER_BAN_ADD = 22,
|
|
450
|
+
/** Server ban was lifted for a member */
|
|
371
451
|
MEMBER_BAN_REMOVE = 23,
|
|
452
|
+
/** Member was updated in server */
|
|
372
453
|
MEMBER_UPDATE = 24,
|
|
454
|
+
/** Member was added or removed from a role */
|
|
373
455
|
MEMBER_ROLE_UPDATE = 25,
|
|
456
|
+
/** Member was moved to a different voice channel */
|
|
374
457
|
MEMBER_MOVE = 26,
|
|
458
|
+
/** Member was disconnected from a voice channel */
|
|
375
459
|
MEMBER_DISCONNECT = 27,
|
|
460
|
+
/** Bot user was added to server */
|
|
376
461
|
BOT_ADD = 28,
|
|
462
|
+
/** Role was created */
|
|
377
463
|
ROLE_CREATE = 30,
|
|
464
|
+
/** Role was edited */
|
|
378
465
|
ROLE_UPDATE = 31,
|
|
466
|
+
/** Role was deleted */
|
|
379
467
|
ROLE_DELETE = 32,
|
|
468
|
+
/** Server invite was created */
|
|
380
469
|
INVITE_CREATE = 40,
|
|
470
|
+
/** Server invite was updated */
|
|
381
471
|
INVITE_UPDATE = 41,
|
|
472
|
+
/** Server invite was deleted */
|
|
382
473
|
INVITE_DELETE = 42,
|
|
474
|
+
/** Webhook was created */
|
|
383
475
|
WEBHOOK_CREATE = 50,
|
|
476
|
+
/** Webhook properties or channel were updated */
|
|
384
477
|
WEBHOOK_UPDATE = 51,
|
|
478
|
+
/** Webhook was deleted */
|
|
385
479
|
WEBHOOK_DELETE = 52,
|
|
480
|
+
/** Emoji was created */
|
|
386
481
|
EMOJI_CREATE = 60,
|
|
482
|
+
/** Emoji name was updated */
|
|
387
483
|
EMOJI_UPDATE = 61,
|
|
484
|
+
/** Emoji was deleted */
|
|
388
485
|
EMOJI_DELETE = 62,
|
|
486
|
+
/** Single message was deleted */
|
|
389
487
|
MESSAGE_DELETE = 72,
|
|
488
|
+
/** Multiple messages were deleted */
|
|
390
489
|
MESSAGE_BULK_DELETE = 73,
|
|
490
|
+
/** Message was pinned to a channel */
|
|
391
491
|
MESSAGE_PIN = 74,
|
|
492
|
+
/** Message was unpinned from a channel */
|
|
392
493
|
MESSAGE_UNPIN = 75,
|
|
494
|
+
/** App was added to server */
|
|
393
495
|
INTEGRATION_CREATE = 80,
|
|
496
|
+
/** App was updated (as an example, its scopes were updated) */
|
|
394
497
|
INTEGRATION_UPDATE = 81,
|
|
498
|
+
/** App was removed from server */
|
|
395
499
|
INTEGRATION_DELETE = 82,
|
|
500
|
+
/** Stage instance was created (stage channel becomes live) */
|
|
396
501
|
STAGE_INSTANCE_CREATE = 83,
|
|
502
|
+
/** Stage instance details were updated */
|
|
397
503
|
STAGE_INSTANCE_UPDATE = 84,
|
|
504
|
+
/** Stage instance was deleted (stage channel no longer live) */
|
|
398
505
|
STAGE_INSTANCE_DELETE = 85,
|
|
506
|
+
/** Sticker was created */
|
|
399
507
|
STICKER_CREATE = 90,
|
|
508
|
+
/** Sticker details were updated */
|
|
400
509
|
STICKER_UPDATE = 91,
|
|
510
|
+
/** Sticker was deleted */
|
|
401
511
|
STICKER_DELETE = 92,
|
|
512
|
+
/** Event was created */
|
|
402
513
|
GUILD_SCHEDULED_EVENT_CREATE = 100,
|
|
514
|
+
/** Event was updated */
|
|
403
515
|
GUILD_SCHEDULED_EVENT_UPDATE = 101,
|
|
516
|
+
/** Event was cancelled */
|
|
404
517
|
GUILD_SCHEDULED_EVENT_DELETE = 102,
|
|
518
|
+
/** Thread was created in a channel */
|
|
405
519
|
THREAD_CREATE = 110,
|
|
520
|
+
/** Thread was updated */
|
|
406
521
|
THREAD_UPDATE = 111,
|
|
522
|
+
/** Thread was deleted */
|
|
407
523
|
THREAD_DELETE = 112,
|
|
524
|
+
/** Permissions were updated for a command */
|
|
525
|
+
APPLICATION_COMMAND_PERMISSION_UPDATE = 121,
|
|
526
|
+
/** Auto Moderation rule was created */
|
|
527
|
+
AUTO_MODERATION_RULE_CREATE = 140,
|
|
528
|
+
/** Auto Moderation rule was updated */
|
|
529
|
+
AUTO_MODERATION_RULE_UPDATE = 141,
|
|
530
|
+
/** Auto Moderation rule was deleted */
|
|
531
|
+
AUTO_MODERATION_RULE_DELETE = 142,
|
|
532
|
+
/** Message was blocked by Auto Moderation */
|
|
533
|
+
AUTO_MODERATION_BLOCK_MESSAGE = 143,
|
|
534
|
+
/** Message was flagged by Auto Moderation */
|
|
535
|
+
AUTO_MODERATION_FLAG_TO_CHANNEL = 144,
|
|
536
|
+
/** Member was timed out by Auto Moderation */
|
|
537
|
+
AUTO_MODERATION_USER_COMMUNICATION_DISABLED = 145,
|
|
538
|
+
}
|
|
539
|
+
export interface AutoModerationAction {
|
|
540
|
+
/** the type of action */
|
|
541
|
+
type: ActionType
|
|
542
|
+
/** additional metadata needed during execution for this specific action type */
|
|
543
|
+
metadata?: ActionMetadatum
|
|
544
|
+
}
|
|
545
|
+
export interface AutoModerationActionExecutionEvent {
|
|
546
|
+
/** ID of the guild in which action was executed */
|
|
547
|
+
guild_id: Snowflake
|
|
548
|
+
/** Action which was executed */
|
|
549
|
+
action: AutoModerationAction
|
|
550
|
+
/** ID of the rule which action belongs to */
|
|
551
|
+
rule_id: Snowflake
|
|
552
|
+
/** Trigger type of rule which was triggered */
|
|
553
|
+
rule_trigger_type: TriggerType
|
|
554
|
+
/** ID of the user which generated the content which triggered the rule */
|
|
555
|
+
user_id: Snowflake
|
|
556
|
+
/** ID of the channel in which user content was posted */
|
|
557
|
+
channel_id?: Snowflake
|
|
558
|
+
/** ID of any user message which content belongs to * */
|
|
559
|
+
message_id?: Snowflake
|
|
560
|
+
/** ID of any system auto moderation messages posted as a result of this action ** */
|
|
561
|
+
alert_system_message_id?: Snowflake
|
|
562
|
+
/** User-generated text content */
|
|
563
|
+
content: string
|
|
564
|
+
/** Word or phrase configured in the rule that triggered the rule */
|
|
565
|
+
matched_keyword?: string | null
|
|
566
|
+
/** Substring in content that triggered the rule */
|
|
567
|
+
matched_content?: string | null
|
|
408
568
|
}
|
|
569
|
+
export interface AutoModerationRule {
|
|
570
|
+
/** the id of this rule */
|
|
571
|
+
id: Snowflake
|
|
572
|
+
/** the id of the guild which this rule belongs to */
|
|
573
|
+
guild_id: Snowflake
|
|
574
|
+
/** the rule name */
|
|
575
|
+
name: string
|
|
576
|
+
/** the user which first created this rule */
|
|
577
|
+
creator_id: Snowflake
|
|
578
|
+
/** the rule event type */
|
|
579
|
+
event_type: EventType
|
|
580
|
+
/** the rule trigger type */
|
|
581
|
+
trigger_type: TriggerType
|
|
582
|
+
/** the rule trigger metadata */
|
|
583
|
+
trigger_metadata: TriggerMetadatum
|
|
584
|
+
/** the actions which will execute when the rule is triggered */
|
|
585
|
+
actions: AutoModerationAction[]
|
|
586
|
+
/** whether the rule is enabled */
|
|
587
|
+
enabled: boolean
|
|
588
|
+
/** the role ids that should not be affected by the rule (Maximum of 20) */
|
|
589
|
+
exempt_roles: Snowflake[]
|
|
590
|
+
/** the channel ids that should not be affected by the rule (Maximum of 50) */
|
|
591
|
+
exempt_channels: Snowflake[]
|
|
592
|
+
}
|
|
593
|
+
export type AutoModerationRuleCreateEvent = AutoModerationRule
|
|
594
|
+
export type AutoModerationRuleDeleteEvent = AutoModerationRule
|
|
595
|
+
export type AutoModerationRuleUpdateEvent = AutoModerationRule
|
|
409
596
|
export interface Ban {
|
|
410
597
|
/** the reason for the ban */
|
|
411
598
|
reason?: string | null
|
|
@@ -415,7 +602,7 @@ export interface Ban {
|
|
|
415
602
|
export interface BeginGuildPruneParams {
|
|
416
603
|
/** number of days to prune (1-30) */
|
|
417
604
|
days: number
|
|
418
|
-
/** whether
|
|
605
|
+
/** whether pruned is returned, discouraged for large guilds */
|
|
419
606
|
compute_prune_count: boolean
|
|
420
607
|
/** role(s) to include */
|
|
421
608
|
include_roles: Snowflake[]
|
|
@@ -427,33 +614,41 @@ export interface BulkDeleteMessageParams {
|
|
|
427
614
|
messages: Snowflake[]
|
|
428
615
|
}
|
|
429
616
|
export interface BulkOverwriteGuildApplicationCommandParams {
|
|
430
|
-
/**
|
|
431
|
-
id
|
|
432
|
-
/** 1-32
|
|
617
|
+
/** ID of the command, if known */
|
|
618
|
+
id?: Snowflake
|
|
619
|
+
/** Name of command, 1-32 characters */
|
|
433
620
|
name: string
|
|
621
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
622
|
+
name_localizations?: Locale | null
|
|
434
623
|
/** 1-100 character description */
|
|
435
624
|
description: string
|
|
436
|
-
/**
|
|
625
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
626
|
+
description_localizations?: Locale | null
|
|
627
|
+
/** Parameters for the command */
|
|
437
628
|
options?: ApplicationCommandOption[]
|
|
438
|
-
/**
|
|
629
|
+
/** Set of permissions represented as a bit set */
|
|
630
|
+
default_member_permissions?: string | null
|
|
631
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
632
|
+
dm_permission?: boolean | null
|
|
633
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
439
634
|
default_permission?: boolean
|
|
440
|
-
/**
|
|
635
|
+
/** Type of command, defaults 1 if not set */
|
|
441
636
|
type?: ApplicationCommandType
|
|
442
637
|
}
|
|
443
638
|
export interface Button {
|
|
444
639
|
/** 2 for a button */
|
|
445
640
|
type: number
|
|
446
|
-
/**
|
|
641
|
+
/** A button style */
|
|
447
642
|
style: ButtonStyle
|
|
448
|
-
/**
|
|
643
|
+
/** Text that appears on the button; max 80 characters */
|
|
449
644
|
label?: string
|
|
450
645
|
/** name, id, and animated */
|
|
451
646
|
emoji?: Emoji
|
|
452
|
-
/**
|
|
647
|
+
/** Developer-defined identifier for the button; max 100 characters */
|
|
453
648
|
custom_id?: string
|
|
454
|
-
/**
|
|
649
|
+
/** URL for link-style buttons */
|
|
455
650
|
url?: string
|
|
456
|
-
/**
|
|
651
|
+
/** Whether the button is disabled (defaults to false) */
|
|
457
652
|
disabled?: boolean
|
|
458
653
|
}
|
|
459
654
|
export enum ButtonStyle {
|
|
@@ -475,12 +670,12 @@ export interface Channel {
|
|
|
475
670
|
/** explicit permission overwrites for members and roles */
|
|
476
671
|
permission_overwrites?: Overwrite[]
|
|
477
672
|
/** the name of the channel (1-100 characters) */
|
|
478
|
-
name?: string
|
|
479
|
-
/** the channel topic (0-1024 characters) */
|
|
673
|
+
name?: string | null
|
|
674
|
+
/** the channel topic (0-4096 characters for GUILD_FORUM channels, 0-1024 characters for all others) */
|
|
480
675
|
topic?: string | null
|
|
481
676
|
/** whether the channel is nsfw */
|
|
482
677
|
nsfw?: boolean
|
|
483
|
-
/** the id of the last message sent in this channel (may not point to an existing or valid message) */
|
|
678
|
+
/** the id of the last message sent in this channel (or thread for GUILD_FORUM channels) (may not point to an existing or valid message or thread) */
|
|
484
679
|
last_message_id?: Snowflake | null
|
|
485
680
|
/** the bitrate (in bits) of the voice channel */
|
|
486
681
|
bitrate?: number
|
|
@@ -504,7 +699,7 @@ export interface Channel {
|
|
|
504
699
|
rtc_region?: string | null
|
|
505
700
|
/** the camera video quality mode of the voice channel, 1 when not present */
|
|
506
701
|
video_quality_mode?: VideoQualityMode
|
|
507
|
-
/**
|
|
702
|
+
/** number of messages (not including the initial message or deleted messages) in a thread. */
|
|
508
703
|
message_count?: number
|
|
509
704
|
/** an approximate count of users in a thread, stops counting at 50 */
|
|
510
705
|
member_count?: number
|
|
@@ -512,13 +707,33 @@ export interface Channel {
|
|
|
512
707
|
thread_metadata?: ThreadMetadatum
|
|
513
708
|
/** thread member object for the current user, if they have joined the thread, only included on certain API endpoints */
|
|
514
709
|
member?: ThreadMember
|
|
515
|
-
/** default duration
|
|
710
|
+
/** default duration, copied onto newly created threads, in minutes, threads will stop showing in the channel list after the specified period of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
516
711
|
default_auto_archive_duration?: number
|
|
517
712
|
/** computed permissions for the invoking user in the channel, including overwrites, only included when part of the resolved data received on a slash command interaction */
|
|
518
713
|
permissions?: string
|
|
714
|
+
/** channel flags combined as a bitfield */
|
|
715
|
+
flags?: number
|
|
716
|
+
/** number of messages ever sent in a thread, it's similar to message_count on message creation, but will not decrement the number when a message is deleted */
|
|
717
|
+
total_message_sent?: number
|
|
718
|
+
/** the set of tags that can be used in a GUILD_FORUM channel */
|
|
719
|
+
available_tags?: ForumTag[]
|
|
720
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
721
|
+
applied_tags?: Snowflake[]
|
|
722
|
+
/** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
|
|
723
|
+
default_reaction_emoji?: DefaultReaction | null
|
|
724
|
+
/** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
|
|
725
|
+
default_thread_rate_limit_per_user?: number
|
|
726
|
+
/** the default sort order type used to order posts in GUILD_FORUM channels. Defaults to null, which indicates a preferred sort order hasn't been set by a channel admin */
|
|
727
|
+
default_sort_order?: SortOrderType | null
|
|
519
728
|
}
|
|
520
729
|
export type ChannelCreateEvent = Channel
|
|
521
730
|
export type ChannelDeleteEvent = Channel
|
|
731
|
+
export const ChannelFlag = {
|
|
732
|
+
/** this thread is pinned to the top of its parent GUILD_FORUM channel */
|
|
733
|
+
PINNED: 1 << 1,
|
|
734
|
+
/** whether a tag is required to be specified when creating a thread in a GUILD_FORUM channel. Tags are specified in the applied_tags field. */
|
|
735
|
+
REQUIRE_TAG: 1 << 4,
|
|
736
|
+
} as const
|
|
522
737
|
export interface ChannelMention {
|
|
523
738
|
/** id of the channel */
|
|
524
739
|
id: Snowflake
|
|
@@ -530,11 +745,11 @@ export interface ChannelMention {
|
|
|
530
745
|
name: string
|
|
531
746
|
}
|
|
532
747
|
export interface ChannelPinsUpdateEvent {
|
|
533
|
-
/**
|
|
748
|
+
/** ID of the guild */
|
|
534
749
|
guild_id?: Snowflake
|
|
535
|
-
/**
|
|
750
|
+
/** ID of the channel */
|
|
536
751
|
channel_id: Snowflake
|
|
537
|
-
/**
|
|
752
|
+
/** Time at which the most recent pinned message was pinned */
|
|
538
753
|
last_pin_timestamp?: string | null
|
|
539
754
|
}
|
|
540
755
|
export enum ChannelType {
|
|
@@ -548,45 +763,55 @@ export enum ChannelType {
|
|
|
548
763
|
GROUP_DM = 3,
|
|
549
764
|
/** an organizational category that contains up to 50 channels */
|
|
550
765
|
GUILD_CATEGORY = 4,
|
|
551
|
-
/** a channel that users can follow and crosspost into their own server */
|
|
552
|
-
|
|
553
|
-
/** a channel
|
|
554
|
-
|
|
555
|
-
/** a temporary sub-channel within a
|
|
556
|
-
|
|
557
|
-
/** a temporary sub-channel within a GUILD_TEXT channel */
|
|
558
|
-
GUILD_PUBLIC_THREAD = 11,
|
|
766
|
+
/** a channel that users can follow and crosspost into their own server (formerly news channels) */
|
|
767
|
+
GUILD_ANNOUNCEMENT = 5,
|
|
768
|
+
/** a temporary sub-channel within a GUILD_ANNOUNCEMENT channel */
|
|
769
|
+
ANNOUNCEMENT_THREAD = 10,
|
|
770
|
+
/** a temporary sub-channel within a GUILD_TEXT or GUILD_FORUM channel */
|
|
771
|
+
PUBLIC_THREAD = 11,
|
|
559
772
|
/** a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
|
|
560
|
-
|
|
773
|
+
PRIVATE_THREAD = 12,
|
|
561
774
|
/** a voice channel for hosting events with an audience */
|
|
562
775
|
GUILD_STAGE_VOICE = 13,
|
|
776
|
+
/** the channel in a hub containing the listed servers */
|
|
777
|
+
GUILD_DIRECTORY = 14,
|
|
778
|
+
/** Channel that can only contain threads */
|
|
779
|
+
GUILD_FORUM = 15,
|
|
563
780
|
}
|
|
564
781
|
export type ChannelUpdateEvent = Channel
|
|
565
782
|
export interface ClientStatus {
|
|
566
|
-
/**
|
|
783
|
+
/** User's status set for an active desktop (Windows, Linux, Mac) application session */
|
|
567
784
|
desktop?: string
|
|
568
|
-
/**
|
|
785
|
+
/** User's status set for an active mobile (iOS, Android) application session */
|
|
569
786
|
mobile?: string
|
|
570
|
-
/**
|
|
787
|
+
/** User's status set for an active web (browser, bot account) application session */
|
|
571
788
|
web?: string
|
|
572
789
|
}
|
|
573
790
|
export type Component = ActionRow | Button | TextInput | SelectMenu
|
|
574
791
|
export enum ComponentType {
|
|
575
|
-
/**
|
|
792
|
+
/** Container for other components */
|
|
576
793
|
ACTION_ROW = 1,
|
|
577
|
-
/**
|
|
794
|
+
/** Button object */
|
|
578
795
|
BUTTON = 2,
|
|
579
|
-
/**
|
|
580
|
-
|
|
581
|
-
/**
|
|
796
|
+
/** Select menu for picking from defined text options */
|
|
797
|
+
STRING_SELECT = 3,
|
|
798
|
+
/** Text input object */
|
|
582
799
|
TEXT_INPUT = 4,
|
|
800
|
+
/** Select menu for users */
|
|
801
|
+
USER_SELECT = 5,
|
|
802
|
+
/** Select menu for roles */
|
|
803
|
+
ROLE_SELECT = 6,
|
|
804
|
+
/** Select menu for mentionables (users and roles) */
|
|
805
|
+
MENTIONABLE_SELECT = 7,
|
|
806
|
+
/** Select menu for channels */
|
|
807
|
+
CHANNEL_SELECT = 8,
|
|
583
808
|
}
|
|
584
809
|
export interface Connection {
|
|
585
810
|
/** id of the connection account */
|
|
586
811
|
id: string
|
|
587
812
|
/** the username of the connection account */
|
|
588
813
|
name: string
|
|
589
|
-
/** the service of
|
|
814
|
+
/** the service of this connection */
|
|
590
815
|
type: string
|
|
591
816
|
/** whether the connection is revoked */
|
|
592
817
|
revoked?: boolean
|
|
@@ -598,9 +823,29 @@ export interface Connection {
|
|
|
598
823
|
friend_sync: boolean
|
|
599
824
|
/** whether activities related to this connection will be shown in presence updates */
|
|
600
825
|
show_activity: boolean
|
|
826
|
+
/** whether this connection has a corresponding third party OAuth2 token */
|
|
827
|
+
two_way_link: boolean
|
|
601
828
|
/** visibility of this connection */
|
|
602
829
|
visibility: VisibilityType
|
|
603
830
|
}
|
|
831
|
+
export interface CreateAutoModerationRuleParams {
|
|
832
|
+
/** the rule name */
|
|
833
|
+
name: string
|
|
834
|
+
/** the event type */
|
|
835
|
+
event_type: EventType
|
|
836
|
+
/** the trigger type */
|
|
837
|
+
trigger_type: TriggerType
|
|
838
|
+
/** the trigger metadata */
|
|
839
|
+
trigger_metadata?: TriggerMetadatum
|
|
840
|
+
/** the actions which will execute when the rule is triggered */
|
|
841
|
+
actions: AutoModerationAction[]
|
|
842
|
+
/** whether the rule is enabled (False by default) */
|
|
843
|
+
enabled?: boolean
|
|
844
|
+
/** the role ids that should not be affected by the rule (Maximum of 20) */
|
|
845
|
+
exempt_roles?: Snowflake[]
|
|
846
|
+
/** the channel ids that should not be affected by the rule (Maximum of 50) */
|
|
847
|
+
exempt_channels?: Snowflake[]
|
|
848
|
+
}
|
|
604
849
|
export interface CreateChannelInviteParams {
|
|
605
850
|
/** duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days) */
|
|
606
851
|
max_age: number
|
|
@@ -622,15 +867,23 @@ export interface CreateDmParams {
|
|
|
622
867
|
recipient_id: Snowflake
|
|
623
868
|
}
|
|
624
869
|
export interface CreateGlobalApplicationCommandParams {
|
|
625
|
-
/** 1-32
|
|
870
|
+
/** Name of command, 1-32 characters */
|
|
626
871
|
name: string
|
|
627
|
-
/**
|
|
628
|
-
|
|
872
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
873
|
+
name_localizations?: Locale | null
|
|
874
|
+
/** 1-100 character description for CHAT_INPUT commands */
|
|
875
|
+
description?: string
|
|
876
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
877
|
+
description_localizations?: Locale | null
|
|
629
878
|
/** the parameters for the command */
|
|
630
879
|
options?: ApplicationCommandOption[]
|
|
631
|
-
/**
|
|
880
|
+
/** Set of permissions represented as a bit set */
|
|
881
|
+
default_member_permissions?: string | null
|
|
882
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
883
|
+
dm_permission?: boolean | null
|
|
884
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
632
885
|
default_permission?: boolean
|
|
633
|
-
/**
|
|
886
|
+
/** Type of command, defaults 1 if not set */
|
|
634
887
|
type?: ApplicationCommandType
|
|
635
888
|
}
|
|
636
889
|
export interface CreateGroupDmParams {
|
|
@@ -640,22 +893,28 @@ export interface CreateGroupDmParams {
|
|
|
640
893
|
nicks: Record<string, string>
|
|
641
894
|
}
|
|
642
895
|
export interface CreateGuildApplicationCommandParams {
|
|
643
|
-
/** 1-32
|
|
896
|
+
/** Name of command, 1-32 characters */
|
|
644
897
|
name: string
|
|
645
|
-
/**
|
|
646
|
-
|
|
647
|
-
/**
|
|
898
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
899
|
+
name_localizations?: Locale | null
|
|
900
|
+
/** 1-100 character description for CHAT_INPUT commands */
|
|
901
|
+
description?: string
|
|
902
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
903
|
+
description_localizations?: Locale | null
|
|
904
|
+
/** Parameters for the command */
|
|
648
905
|
options?: ApplicationCommandOption[]
|
|
649
|
-
/**
|
|
906
|
+
/** Set of permissions represented as a bit set */
|
|
907
|
+
default_member_permissions?: string | null
|
|
908
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
650
909
|
default_permission?: boolean
|
|
651
|
-
/**
|
|
910
|
+
/** Type of command, defaults 1 if not set */
|
|
652
911
|
type?: ApplicationCommandType
|
|
653
912
|
}
|
|
654
913
|
export interface CreateGuildBanParams {
|
|
655
|
-
/** number of days to delete messages for (0-7) */
|
|
914
|
+
/** number of days to delete messages for (0-7) (deprecated) */
|
|
656
915
|
delete_message_days?: number
|
|
657
|
-
/**
|
|
658
|
-
|
|
916
|
+
/** number of seconds to delete messages for, between 0 and 604800 (7 days) */
|
|
917
|
+
delete_message_seconds?: number
|
|
659
918
|
}
|
|
660
919
|
export interface CreateGuildChannelParams {
|
|
661
920
|
/** channel name (1-100 characters) */
|
|
@@ -664,9 +923,9 @@ export interface CreateGuildChannelParams {
|
|
|
664
923
|
type: ChannelType
|
|
665
924
|
/** channel topic (0-1024 characters) */
|
|
666
925
|
topic: string
|
|
667
|
-
/** the bitrate (in bits) of the voice channel
|
|
926
|
+
/** the bitrate (in bits) of the voice or stage channel; min 8000 */
|
|
668
927
|
bitrate: number
|
|
669
|
-
/** the user limit of the voice channel
|
|
928
|
+
/** the user limit of the voice channel */
|
|
670
929
|
user_limit: number
|
|
671
930
|
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
672
931
|
rate_limit_per_user: number
|
|
@@ -678,6 +937,18 @@ export interface CreateGuildChannelParams {
|
|
|
678
937
|
parent_id: Snowflake
|
|
679
938
|
/** whether the channel is nsfw */
|
|
680
939
|
nsfw: boolean
|
|
940
|
+
/** channel voice region id of the voice or stage channel, automatic when set to null */
|
|
941
|
+
rtc_region: string
|
|
942
|
+
/** the camera video quality mode of the voice channel */
|
|
943
|
+
video_quality_mode: VideoQualityMode
|
|
944
|
+
/** the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */
|
|
945
|
+
default_auto_archive_duration: number
|
|
946
|
+
/** emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
|
|
947
|
+
default_reaction_emoji: DefaultReaction
|
|
948
|
+
/** set of tags that can be used in a GUILD_FORUM channel */
|
|
949
|
+
available_tags: ForumTag[]
|
|
950
|
+
/** the default sort order type used to order posts in GUILD_FORUM channels */
|
|
951
|
+
default_sort_order: SortOrderType
|
|
681
952
|
}
|
|
682
953
|
export interface CreateGuildEmojiParams {
|
|
683
954
|
/** name of the emoji */
|
|
@@ -712,7 +983,7 @@ export interface CreateGuildParams {
|
|
|
712
983
|
channels?: Channel[]
|
|
713
984
|
/** id for afk channel */
|
|
714
985
|
afk_channel_id?: Snowflake
|
|
715
|
-
/** afk timeout in seconds */
|
|
986
|
+
/** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
|
|
716
987
|
afk_timeout?: number
|
|
717
988
|
/** the id of the channel where guild notices such as welcome messages and boost events are posted */
|
|
718
989
|
system_channel_id?: Snowflake
|
|
@@ -720,7 +991,7 @@ export interface CreateGuildParams {
|
|
|
720
991
|
system_channel_flags?: number
|
|
721
992
|
}
|
|
722
993
|
export interface CreateGuildRoleParams {
|
|
723
|
-
/** name of the role */
|
|
994
|
+
/** name of the role, max 100 characters */
|
|
724
995
|
name: string
|
|
725
996
|
/** bitwise value of the enabled/disabled permissions */
|
|
726
997
|
permissions: string
|
|
@@ -772,33 +1043,33 @@ export interface CreateGuildTemplateParams {
|
|
|
772
1043
|
description?: string | null
|
|
773
1044
|
}
|
|
774
1045
|
export interface CreateMessageParams {
|
|
775
|
-
/**
|
|
776
|
-
content
|
|
1046
|
+
/** Message contents (up to 2000 characters) */
|
|
1047
|
+
content?: string
|
|
1048
|
+
/** Can be used to verify a message was sent (up to 25 characters). Value will appear in the Message Create event. */
|
|
1049
|
+
nonce?: string
|
|
777
1050
|
/** true if this is a TTS message */
|
|
778
|
-
tts
|
|
779
|
-
/**
|
|
780
|
-
embeds
|
|
781
|
-
/**
|
|
782
|
-
|
|
783
|
-
/**
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
|
|
787
|
-
/** the components to include with the message */
|
|
788
|
-
components: Component[]
|
|
1051
|
+
tts?: boolean
|
|
1052
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
1053
|
+
embeds?: Embed[]
|
|
1054
|
+
/** Allowed mentions for the message */
|
|
1055
|
+
allowed_mentions?: AllowedMention
|
|
1056
|
+
/** Include to make your message a reply */
|
|
1057
|
+
message_reference?: MessageReference
|
|
1058
|
+
/** Components to include with the message */
|
|
1059
|
+
components?: Component[]
|
|
789
1060
|
/** IDs of up to 3 stickers in the server to send in the message */
|
|
790
|
-
sticker_ids
|
|
791
|
-
/**
|
|
792
|
-
files
|
|
793
|
-
/** JSON
|
|
794
|
-
payload_json
|
|
795
|
-
/**
|
|
796
|
-
attachments
|
|
797
|
-
/**
|
|
798
|
-
flags
|
|
1061
|
+
sticker_ids?: Snowflake[]
|
|
1062
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
1063
|
+
files?: string
|
|
1064
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
1065
|
+
payload_json?: string
|
|
1066
|
+
/** Attachment objects with filename and description. See Uploading Files */
|
|
1067
|
+
attachments?: Attachment[]
|
|
1068
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
1069
|
+
flags?: number
|
|
799
1070
|
}
|
|
800
1071
|
export function createRoutes<O = any>(
|
|
801
|
-
fetch: <R, P>(route: Route<P, O>) =>
|
|
1072
|
+
fetch: <R, P>(route: Route<P, O>) => RestResponse<R>,
|
|
802
1073
|
): Endpoints<O> {
|
|
803
1074
|
return {
|
|
804
1075
|
addGuildMember: (guildId, userId, params, options) =>
|
|
@@ -820,16 +1091,10 @@ export function createRoutes<O = any>(
|
|
|
820
1091
|
url: `/channels/${channelId}/thread-members/${userId}`,
|
|
821
1092
|
options,
|
|
822
1093
|
}),
|
|
823
|
-
batchEditApplicationCommandPermissions: (
|
|
824
|
-
applicationId,
|
|
825
|
-
guildId,
|
|
826
|
-
params,
|
|
827
|
-
options,
|
|
828
|
-
) =>
|
|
1094
|
+
batchEditApplicationCommandPermissions: (applicationId, guildId, options) =>
|
|
829
1095
|
fetch({
|
|
830
1096
|
method: "PUT",
|
|
831
1097
|
url: `/applications/${applicationId}/guilds/${guildId}/commands/permissions`,
|
|
832
|
-
params,
|
|
833
1098
|
options,
|
|
834
1099
|
}),
|
|
835
1100
|
beginGuildPrune: (guildId, params, options) =>
|
|
@@ -864,6 +1129,13 @@ export function createRoutes<O = any>(
|
|
|
864
1129
|
params,
|
|
865
1130
|
options,
|
|
866
1131
|
}),
|
|
1132
|
+
createAutoModerationRule: (guildId, params, options) =>
|
|
1133
|
+
fetch({
|
|
1134
|
+
method: "POST",
|
|
1135
|
+
url: `/guilds/${guildId}/auto-moderation/rules`,
|
|
1136
|
+
params,
|
|
1137
|
+
options,
|
|
1138
|
+
}),
|
|
867
1139
|
createChannelInvite: (channelId, params, options) =>
|
|
868
1140
|
fetch({
|
|
869
1141
|
method: "POST",
|
|
@@ -1025,6 +1297,12 @@ export function createRoutes<O = any>(
|
|
|
1025
1297
|
url: `/channels/${channelId}/messages/${messageId}/reactions/${emoji}`,
|
|
1026
1298
|
options,
|
|
1027
1299
|
}),
|
|
1300
|
+
deleteAutoModerationRule: (guildId, autoModerationRuleId, options) =>
|
|
1301
|
+
fetch({
|
|
1302
|
+
method: "DELETE",
|
|
1303
|
+
url: `/guilds/${guildId}/auto-moderation/rules/${autoModerationRuleId}`,
|
|
1304
|
+
options,
|
|
1305
|
+
}),
|
|
1028
1306
|
deleteChannelPermission: (channelId, overwriteId, options) =>
|
|
1029
1307
|
fetch({
|
|
1030
1308
|
method: "DELETE",
|
|
@@ -1266,7 +1544,7 @@ export function createRoutes<O = any>(
|
|
|
1266
1544
|
params,
|
|
1267
1545
|
options,
|
|
1268
1546
|
}),
|
|
1269
|
-
|
|
1547
|
+
followAnnouncementChannel: (channelId, params, options) =>
|
|
1270
1548
|
fetch({
|
|
1271
1549
|
method: "POST",
|
|
1272
1550
|
url: `/channels/${channelId}/followers`,
|
|
@@ -1284,6 +1562,12 @@ export function createRoutes<O = any>(
|
|
|
1284
1562
|
url: `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}/permissions`,
|
|
1285
1563
|
options,
|
|
1286
1564
|
}),
|
|
1565
|
+
getAutoModerationRule: (guildId, autoModerationRuleId, options) =>
|
|
1566
|
+
fetch({
|
|
1567
|
+
method: "GET",
|
|
1568
|
+
url: `/guilds/${guildId}/auto-moderation/rules/${autoModerationRuleId}`,
|
|
1569
|
+
options,
|
|
1570
|
+
}),
|
|
1287
1571
|
getChannel: (channelId, options) =>
|
|
1288
1572
|
fetch({
|
|
1289
1573
|
method: "GET",
|
|
@@ -1315,6 +1599,18 @@ export function createRoutes<O = any>(
|
|
|
1315
1599
|
url: `/channels/${channelId}/webhooks`,
|
|
1316
1600
|
options,
|
|
1317
1601
|
}),
|
|
1602
|
+
getCurrentAuthorizationInformation: (options) =>
|
|
1603
|
+
fetch({
|
|
1604
|
+
method: "GET",
|
|
1605
|
+
url: `/oauth2/@me`,
|
|
1606
|
+
options,
|
|
1607
|
+
}),
|
|
1608
|
+
getCurrentBotApplicationInformation: (options) =>
|
|
1609
|
+
fetch({
|
|
1610
|
+
method: "GET",
|
|
1611
|
+
url: `/oauth2/applications/@me`,
|
|
1612
|
+
options,
|
|
1613
|
+
}),
|
|
1318
1614
|
getCurrentUser: (options) =>
|
|
1319
1615
|
fetch({
|
|
1320
1616
|
method: "GET",
|
|
@@ -1358,10 +1654,11 @@ export function createRoutes<O = any>(
|
|
|
1358
1654
|
url: `/applications/${applicationId}/commands/${commandId}`,
|
|
1359
1655
|
options,
|
|
1360
1656
|
}),
|
|
1361
|
-
getGlobalApplicationCommands: (applicationId, options) =>
|
|
1657
|
+
getGlobalApplicationCommands: (applicationId, params, options) =>
|
|
1362
1658
|
fetch({
|
|
1363
1659
|
method: "GET",
|
|
1364
1660
|
url: `/applications/${applicationId}/commands`,
|
|
1661
|
+
params,
|
|
1365
1662
|
options,
|
|
1366
1663
|
}),
|
|
1367
1664
|
getGuild: (guildId, params, options) =>
|
|
@@ -1383,10 +1680,11 @@ export function createRoutes<O = any>(
|
|
|
1383
1680
|
url: `/applications/${applicationId}/guilds/${guildId}/commands/permissions`,
|
|
1384
1681
|
options,
|
|
1385
1682
|
}),
|
|
1386
|
-
getGuildApplicationCommands: (applicationId, guildId, options) =>
|
|
1683
|
+
getGuildApplicationCommands: (applicationId, guildId, params, options) =>
|
|
1387
1684
|
fetch({
|
|
1388
1685
|
method: "GET",
|
|
1389
1686
|
url: `/applications/${applicationId}/guilds/${guildId}/commands`,
|
|
1687
|
+
params,
|
|
1390
1688
|
options,
|
|
1391
1689
|
}),
|
|
1392
1690
|
getGuildAuditLog: (guildId, params, options) =>
|
|
@@ -1402,10 +1700,11 @@ export function createRoutes<O = any>(
|
|
|
1402
1700
|
url: `/guilds/${guildId}/bans/${userId}`,
|
|
1403
1701
|
options,
|
|
1404
1702
|
}),
|
|
1405
|
-
getGuildBans: (guildId, options) =>
|
|
1703
|
+
getGuildBans: (guildId, params, options) =>
|
|
1406
1704
|
fetch({
|
|
1407
1705
|
method: "GET",
|
|
1408
1706
|
url: `/guilds/${guildId}/bans`,
|
|
1707
|
+
params,
|
|
1409
1708
|
options,
|
|
1410
1709
|
}),
|
|
1411
1710
|
getGuildChannels: (guildId, options) =>
|
|
@@ -1647,16 +1946,16 @@ export function createRoutes<O = any>(
|
|
|
1647
1946
|
url: `/channels/${channelId}/thread-members/@me`,
|
|
1648
1947
|
options,
|
|
1649
1948
|
}),
|
|
1650
|
-
|
|
1949
|
+
listActiveGuildThreads: (guildId, options) =>
|
|
1651
1950
|
fetch({
|
|
1652
1951
|
method: "GET",
|
|
1653
|
-
url: `/
|
|
1952
|
+
url: `/guilds/${guildId}/threads/active`,
|
|
1654
1953
|
options,
|
|
1655
1954
|
}),
|
|
1656
|
-
|
|
1955
|
+
listAutoModerationRulesForGuild: (guildId, options) =>
|
|
1657
1956
|
fetch({
|
|
1658
1957
|
method: "GET",
|
|
1659
|
-
url: `/guilds/${guildId}/
|
|
1958
|
+
url: `/guilds/${guildId}/auto-moderation/rules`,
|
|
1660
1959
|
options,
|
|
1661
1960
|
}),
|
|
1662
1961
|
listGuildEmojis: (guildId, options) =>
|
|
@@ -1724,6 +2023,18 @@ export function createRoutes<O = any>(
|
|
|
1724
2023
|
url: `/voice/regions`,
|
|
1725
2024
|
options,
|
|
1726
2025
|
}),
|
|
2026
|
+
modifyAutoModerationRule: (
|
|
2027
|
+
guildId,
|
|
2028
|
+
autoModerationRuleId,
|
|
2029
|
+
params,
|
|
2030
|
+
options,
|
|
2031
|
+
) =>
|
|
2032
|
+
fetch({
|
|
2033
|
+
method: "PATCH",
|
|
2034
|
+
url: `/guilds/${guildId}/auto-moderation/rules/${autoModerationRuleId}`,
|
|
2035
|
+
params,
|
|
2036
|
+
options,
|
|
2037
|
+
}),
|
|
1727
2038
|
modifyChannel: (channelId, params, options) =>
|
|
1728
2039
|
fetch({
|
|
1729
2040
|
method: "PATCH",
|
|
@@ -1787,6 +2098,13 @@ export function createRoutes<O = any>(
|
|
|
1787
2098
|
params,
|
|
1788
2099
|
options,
|
|
1789
2100
|
}),
|
|
2101
|
+
modifyGuildMfaLevel: (guildId, params, options) =>
|
|
2102
|
+
fetch({
|
|
2103
|
+
method: "POST",
|
|
2104
|
+
url: `/guilds/${guildId}/mfa`,
|
|
2105
|
+
params,
|
|
2106
|
+
options,
|
|
2107
|
+
}),
|
|
1790
2108
|
modifyGuildRole: (guildId, roleId, params, options) =>
|
|
1791
2109
|
fetch({
|
|
1792
2110
|
method: "PATCH",
|
|
@@ -1904,13 +2222,20 @@ export function createRoutes<O = any>(
|
|
|
1904
2222
|
params,
|
|
1905
2223
|
options,
|
|
1906
2224
|
}),
|
|
1907
|
-
|
|
2225
|
+
startThreadFromMessage: (channelId, messageId, params, options) =>
|
|
1908
2226
|
fetch({
|
|
1909
2227
|
method: "POST",
|
|
1910
2228
|
url: `/channels/${channelId}/messages/${messageId}/threads`,
|
|
1911
2229
|
params,
|
|
1912
2230
|
options,
|
|
1913
2231
|
}),
|
|
2232
|
+
startThreadInForumChannel: (channelId, params, options) =>
|
|
2233
|
+
fetch({
|
|
2234
|
+
method: "POST",
|
|
2235
|
+
url: `/channels/${channelId}/threads`,
|
|
2236
|
+
params,
|
|
2237
|
+
options,
|
|
2238
|
+
}),
|
|
1914
2239
|
startThreadWithoutMessage: (channelId, params, options) =>
|
|
1915
2240
|
fetch({
|
|
1916
2241
|
method: "POST",
|
|
@@ -1945,6 +2270,8 @@ export interface CreateStageInstanceParams {
|
|
|
1945
2270
|
topic: string
|
|
1946
2271
|
/** The privacy level of the Stage instance (default GUILD_ONLY) */
|
|
1947
2272
|
privacy_level?: PrivacyLevel
|
|
2273
|
+
/** Notify @everyone that a Stage instance has started */
|
|
2274
|
+
send_start_notification?: boolean
|
|
1948
2275
|
}
|
|
1949
2276
|
export interface CreateWebhookParams {
|
|
1950
2277
|
/** name of the webhook (1-80 characters) */
|
|
@@ -1958,12 +2285,18 @@ export enum DefaultMessageNotificationLevel {
|
|
|
1958
2285
|
/** members will receive notifications only for messages that @mention them by default */
|
|
1959
2286
|
ONLY_MENTIONS = 1,
|
|
1960
2287
|
}
|
|
2288
|
+
export interface DefaultReaction {
|
|
2289
|
+
/** the id of a guild's custom emoji */
|
|
2290
|
+
emoji_id?: Snowflake | null
|
|
2291
|
+
/** the unicode character of the emoji */
|
|
2292
|
+
emoji_name?: string | null
|
|
2293
|
+
}
|
|
1961
2294
|
export interface DeleteWebhookMessageParams {
|
|
1962
2295
|
/** id of the thread the message is in */
|
|
1963
2296
|
thread_id: Snowflake
|
|
1964
2297
|
}
|
|
1965
2298
|
export interface EditApplicationCommandPermissionParams {
|
|
1966
|
-
/**
|
|
2299
|
+
/** Permissions for the command in the guild */
|
|
1967
2300
|
permissions: ApplicationCommandPermission[]
|
|
1968
2301
|
}
|
|
1969
2302
|
export interface EditChannelPermissionParams {
|
|
@@ -1975,43 +2308,55 @@ export interface EditChannelPermissionParams {
|
|
|
1975
2308
|
type: number
|
|
1976
2309
|
}
|
|
1977
2310
|
export interface EditGlobalApplicationCommandParams {
|
|
1978
|
-
/** 1-32
|
|
2311
|
+
/** Name of command, 1-32 characters */
|
|
1979
2312
|
name?: string
|
|
2313
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
2314
|
+
name_localizations?: Locale | null
|
|
1980
2315
|
/** 1-100 character description */
|
|
1981
2316
|
description?: string
|
|
2317
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
2318
|
+
description_localizations?: Locale | null
|
|
1982
2319
|
/** the parameters for the command */
|
|
1983
2320
|
options?: ApplicationCommandOption[]
|
|
1984
|
-
/**
|
|
2321
|
+
/** Set of permissions represented as a bit set */
|
|
2322
|
+
default_member_permissions?: string | null
|
|
2323
|
+
/** Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. */
|
|
2324
|
+
dm_permission?: boolean | null
|
|
2325
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
1985
2326
|
default_permission?: boolean
|
|
1986
2327
|
}
|
|
1987
2328
|
export interface EditGuildApplicationCommandParams {
|
|
1988
|
-
/** 1-32
|
|
2329
|
+
/** Name of command, 1-32 characters */
|
|
1989
2330
|
name?: string
|
|
2331
|
+
/** Localization dictionary for the name field. Values follow the same restrictions as name */
|
|
2332
|
+
name_localizations?: Locale | null
|
|
1990
2333
|
/** 1-100 character description */
|
|
1991
2334
|
description?: string
|
|
1992
|
-
/**
|
|
2335
|
+
/** Localization dictionary for the description field. Values follow the same restrictions as description */
|
|
2336
|
+
description_localizations?: Locale | null
|
|
2337
|
+
/** Parameters for the command */
|
|
1993
2338
|
options?: ApplicationCommandOption[]
|
|
1994
|
-
/**
|
|
2339
|
+
/** Set of permissions represented as a bit set */
|
|
2340
|
+
default_member_permissions?: string | null
|
|
2341
|
+
/** Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. */
|
|
1995
2342
|
default_permission?: boolean
|
|
1996
2343
|
}
|
|
1997
2344
|
export interface EditMessageParams {
|
|
1998
|
-
/**
|
|
2345
|
+
/** Message contents (up to 2000 characters) */
|
|
1999
2346
|
content: string
|
|
2000
|
-
/**
|
|
2347
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
2001
2348
|
embeds: Embed[]
|
|
2002
|
-
/**
|
|
2003
|
-
embed: Embed
|
|
2004
|
-
/** edit the flags of a message (only SUPPRESS_EMBEDS can currently be set/unset) */
|
|
2349
|
+
/** Edit the flags of a message (only SUPPRESS_EMBEDS can currently be set/unset) */
|
|
2005
2350
|
flags: number
|
|
2006
|
-
/**
|
|
2351
|
+
/** Allowed mentions for the message */
|
|
2007
2352
|
allowed_mentions: AllowedMention
|
|
2008
|
-
/**
|
|
2353
|
+
/** Components to include with the message */
|
|
2009
2354
|
components: Component[]
|
|
2010
|
-
/**
|
|
2355
|
+
/** Contents of the file being sent/edited. See Uploading Files */
|
|
2011
2356
|
files: string
|
|
2012
|
-
/** JSON
|
|
2357
|
+
/** JSON-encoded body of non-file params (multipart/form-data only). See Uploading Files */
|
|
2013
2358
|
payload_json: string
|
|
2014
|
-
/**
|
|
2359
|
+
/** Attached files to keep and possible descriptions for new files. See Uploading Files */
|
|
2015
2360
|
attachments: Attachment[]
|
|
2016
2361
|
}
|
|
2017
2362
|
export interface EditWebhookMessageParams {
|
|
@@ -2159,177 +2504,185 @@ export interface Endpoints<O> {
|
|
|
2159
2504
|
userId: string,
|
|
2160
2505
|
params?: Partial<AddGuildMemberParams>,
|
|
2161
2506
|
options?: O,
|
|
2162
|
-
) =>
|
|
2507
|
+
) => RestResponse<GuildMember>
|
|
2163
2508
|
/** Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
|
|
2164
2509
|
addGuildMemberRole: (
|
|
2165
2510
|
guildId: string,
|
|
2166
2511
|
userId: string,
|
|
2167
2512
|
roleId: string,
|
|
2168
2513
|
options?: O,
|
|
2169
|
-
) =>
|
|
2514
|
+
) => RestResponse<any>
|
|
2170
2515
|
/** Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event. */
|
|
2171
2516
|
addThreadMember: (
|
|
2172
2517
|
channelId: string,
|
|
2173
2518
|
userId: string,
|
|
2174
2519
|
options?: O,
|
|
2175
|
-
) =>
|
|
2520
|
+
) => RestResponse<any>
|
|
2176
2521
|
batchEditApplicationCommandPermissions: (
|
|
2177
2522
|
applicationId: string,
|
|
2178
2523
|
guildId: string,
|
|
2179
|
-
params?: Partial<GuildApplicationCommandPermission[]>,
|
|
2180
2524
|
options?: O,
|
|
2181
|
-
) =>
|
|
2182
|
-
/** Begin a prune operation. Requires the KICK_MEMBERS permission. Returns an object with one
|
|
2525
|
+
) => RestResponse<any>
|
|
2526
|
+
/** Begin a prune operation. Requires the KICK_MEMBERS permission. Returns an object with one pruned key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the compute_prune_count option to false, forcing pruned to null. Fires multiple Guild Member Remove Gateway events. */
|
|
2183
2527
|
beginGuildPrune: (
|
|
2184
2528
|
guildId: string,
|
|
2185
2529
|
params?: Partial<BeginGuildPruneParams>,
|
|
2186
2530
|
options?: O,
|
|
2187
|
-
) =>
|
|
2531
|
+
) => RestResponse<any>
|
|
2188
2532
|
/** Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event. */
|
|
2189
2533
|
bulkDeleteMessages: (
|
|
2190
2534
|
channelId: string,
|
|
2191
2535
|
params?: Partial<BulkDeleteMessageParams>,
|
|
2192
2536
|
options?: O,
|
|
2193
|
-
) =>
|
|
2194
|
-
/** Takes a list of application commands, overwriting the existing global command list for this application.
|
|
2537
|
+
) => RestResponse<any>
|
|
2538
|
+
/** Takes a list of application commands, overwriting the existing global command list for this application. Returns 200 and a list of application command objects. Commands that do not already exist will count toward daily application command create limits. */
|
|
2195
2539
|
bulkOverwriteGlobalApplicationCommands: (
|
|
2196
2540
|
applicationId: string,
|
|
2197
2541
|
options?: O,
|
|
2198
|
-
) =>
|
|
2542
|
+
) => RestResponse<ApplicationCommand[]>
|
|
2199
2543
|
/** Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns 200 and a list of application command objects. */
|
|
2200
2544
|
bulkOverwriteGuildApplicationCommands: (
|
|
2201
2545
|
applicationId: string,
|
|
2202
2546
|
guildId: string,
|
|
2203
2547
|
params?: Partial<BulkOverwriteGuildApplicationCommandParams>,
|
|
2204
2548
|
options?: O,
|
|
2205
|
-
) =>
|
|
2549
|
+
) => RestResponse<ApplicationCommand[]>
|
|
2550
|
+
/** Create a new rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Create Gateway event. */
|
|
2551
|
+
createAutoModerationRule: (
|
|
2552
|
+
guildId: string,
|
|
2553
|
+
params?: Partial<CreateAutoModerationRuleParams>,
|
|
2554
|
+
options?: O,
|
|
2555
|
+
) => RestResponse<AutoModerationRule>
|
|
2206
2556
|
/** Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event. */
|
|
2207
2557
|
createChannelInvite: (
|
|
2208
2558
|
channelId: string,
|
|
2209
2559
|
params?: Partial<CreateChannelInviteParams>,
|
|
2210
2560
|
options?: O,
|
|
2211
|
-
) =>
|
|
2561
|
+
) => RestResponse<Invite>
|
|
2212
2562
|
/** Create a new DM channel with a user. Returns a DM channel object. */
|
|
2213
|
-
createDm: (
|
|
2214
|
-
|
|
2563
|
+
createDm: (
|
|
2564
|
+
params?: Partial<CreateDmParams>,
|
|
2565
|
+
options?: O,
|
|
2566
|
+
) => RestResponse<Channel>
|
|
2567
|
+
/** Create a followup message for an Interaction. Functions the same as Execute Webhook, but wait is always true. The thread_id, avatar_url, and username parameters are not supported when using this endpoint for interaction followups. */
|
|
2215
2568
|
createFollowupMessage: (
|
|
2216
2569
|
applicationId: string,
|
|
2217
2570
|
interactionToken: string,
|
|
2218
2571
|
options?: O,
|
|
2219
|
-
) =>
|
|
2572
|
+
) => RestResponse<any>
|
|
2220
2573
|
createGlobalApplicationCommand: (
|
|
2221
2574
|
applicationId: string,
|
|
2222
2575
|
params?: Partial<CreateGlobalApplicationCommandParams>,
|
|
2223
2576
|
options?: O,
|
|
2224
|
-
) =>
|
|
2577
|
+
) => RestResponse<ApplicationCommand>
|
|
2225
2578
|
/** Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. DMs created with this endpoint will not be shown in the Discord client */
|
|
2226
2579
|
createGroupDm: (
|
|
2227
2580
|
params?: Partial<CreateGroupDmParams>,
|
|
2228
2581
|
options?: O,
|
|
2229
|
-
) =>
|
|
2582
|
+
) => RestResponse<Channel>
|
|
2230
2583
|
/** Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event. */
|
|
2231
2584
|
createGuild: (
|
|
2232
2585
|
params?: Partial<CreateGuildParams>,
|
|
2233
2586
|
options?: O,
|
|
2234
|
-
) =>
|
|
2587
|
+
) => RestResponse<Guild>
|
|
2235
2588
|
createGuildApplicationCommand: (
|
|
2236
2589
|
applicationId: string,
|
|
2237
2590
|
guildId: string,
|
|
2238
2591
|
params?: Partial<CreateGuildApplicationCommandParams>,
|
|
2239
2592
|
options?: O,
|
|
2240
|
-
) =>
|
|
2593
|
+
) => RestResponse<ApplicationCommand>
|
|
2241
2594
|
/** Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the BAN_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event. */
|
|
2242
2595
|
createGuildBan: (
|
|
2243
2596
|
guildId: string,
|
|
2244
2597
|
userId: string,
|
|
2245
2598
|
params?: Partial<CreateGuildBanParams>,
|
|
2246
2599
|
options?: O,
|
|
2247
|
-
) =>
|
|
2600
|
+
) => RestResponse<any>
|
|
2248
2601
|
/** Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event. */
|
|
2249
2602
|
createGuildChannel: (
|
|
2250
2603
|
guildId: string,
|
|
2251
2604
|
params?: Partial<CreateGuildChannelParams>,
|
|
2252
2605
|
options?: O,
|
|
2253
|
-
) =>
|
|
2606
|
+
) => RestResponse<Channel>
|
|
2254
2607
|
/** Create a new emoji for the guild. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
2255
2608
|
createGuildEmoji: (
|
|
2256
2609
|
guildId: string,
|
|
2257
2610
|
params?: Partial<CreateGuildEmojiParams>,
|
|
2258
2611
|
options?: O,
|
|
2259
|
-
) =>
|
|
2612
|
+
) => RestResponse<Emoji>
|
|
2260
2613
|
/** Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event. */
|
|
2261
2614
|
createGuildFromGuildTemplate: (
|
|
2262
2615
|
templateCode: string,
|
|
2263
2616
|
params?: Partial<CreateGuildFromGuildTemplateParams>,
|
|
2264
2617
|
options?: O,
|
|
2265
|
-
) =>
|
|
2618
|
+
) => RestResponse<Guild>
|
|
2266
2619
|
/** Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional. */
|
|
2267
2620
|
createGuildRole: (
|
|
2268
2621
|
guildId: string,
|
|
2269
2622
|
params?: Partial<CreateGuildRoleParams>,
|
|
2270
2623
|
options?: O,
|
|
2271
|
-
) =>
|
|
2272
|
-
/** Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. */
|
|
2624
|
+
) => RestResponse<Role>
|
|
2625
|
+
/** Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event. */
|
|
2273
2626
|
createGuildScheduledEvent: (
|
|
2274
2627
|
guildId: string,
|
|
2275
2628
|
params?: Partial<CreateGuildScheduledEventParams>,
|
|
2276
2629
|
options?: O,
|
|
2277
|
-
) =>
|
|
2278
|
-
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new sticker object on success. */
|
|
2630
|
+
) => RestResponse<GuildScheduledEvent>
|
|
2631
|
+
/** Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
2279
2632
|
createGuildSticker: (
|
|
2280
2633
|
guildId: string,
|
|
2281
2634
|
params?: Partial<CreateGuildStickerParams>,
|
|
2282
2635
|
options?: O,
|
|
2283
|
-
) =>
|
|
2636
|
+
) => RestResponse<Sticker>
|
|
2284
2637
|
/** Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success. */
|
|
2285
2638
|
createGuildTemplate: (
|
|
2286
2639
|
guildId: string,
|
|
2287
2640
|
params?: Partial<CreateGuildTemplateParams>,
|
|
2288
2641
|
options?: O,
|
|
2289
|
-
) =>
|
|
2642
|
+
) => RestResponse<GuildTemplate>
|
|
2290
2643
|
/** Create a response to an Interaction from the gateway. Body is an interaction response. Returns 204 No Content. */
|
|
2291
2644
|
createInteractionResponse: (
|
|
2292
2645
|
interactionId: string,
|
|
2293
2646
|
interactionToken: string,
|
|
2294
2647
|
params?: Partial<InteractionResponse>,
|
|
2295
2648
|
options?: O,
|
|
2296
|
-
) =>
|
|
2649
|
+
) => RestResponse<InteractionResponse>
|
|
2297
2650
|
createMessage: (
|
|
2298
2651
|
channelId: string,
|
|
2299
2652
|
params?: Partial<CreateMessageParams>,
|
|
2300
2653
|
options?: O,
|
|
2301
|
-
) =>
|
|
2302
|
-
/** Create a reaction for the message. This endpoint requires the
|
|
2654
|
+
) => RestResponse<Message>
|
|
2655
|
+
/** Create a reaction for the message. This endpoint requires the READ_MESSAGE_HISTORY permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Add Gateway event.
|
|
2303
2656
|
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
2304
2657
|
createReaction: (
|
|
2305
2658
|
channelId: string,
|
|
2306
2659
|
messageId: string,
|
|
2307
2660
|
emoji: string,
|
|
2308
2661
|
options?: O,
|
|
2309
|
-
) =>
|
|
2310
|
-
/** Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. */
|
|
2662
|
+
) => RestResponse<any>
|
|
2663
|
+
/** Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. Fires a Stage Instance Create Gateway event. */
|
|
2311
2664
|
createStageInstance: (
|
|
2312
2665
|
params?: Partial<CreateStageInstanceParams>,
|
|
2313
2666
|
options?: O,
|
|
2314
|
-
) =>
|
|
2315
|
-
/** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. */
|
|
2667
|
+
) => RestResponse<StageInstance>
|
|
2668
|
+
/** Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. Fires a Webhooks Update Gateway event. */
|
|
2316
2669
|
createWebhook: (
|
|
2317
2670
|
channelId: string,
|
|
2318
2671
|
params?: Partial<CreateWebhookParams>,
|
|
2319
2672
|
options?: O,
|
|
2320
|
-
) =>
|
|
2321
|
-
/** Crosspost a message in
|
|
2673
|
+
) => RestResponse<Webhook>
|
|
2674
|
+
/** Crosspost a message in an Announcement Channel to following channels. This endpoint requires the SEND_MESSAGES permission, if the current user sent the message, or additionally the MANAGE_MESSAGES permission, for all other messages, to be present for the current user. */
|
|
2322
2675
|
crosspostMessage: (
|
|
2323
2676
|
channelId: string,
|
|
2324
2677
|
messageId: string,
|
|
2325
2678
|
options?: O,
|
|
2326
|
-
) =>
|
|
2327
|
-
/** Deletes all reactions on a message. This endpoint requires the
|
|
2679
|
+
) => RestResponse<Message>
|
|
2680
|
+
/** Deletes all reactions on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove All Gateway event. */
|
|
2328
2681
|
deleteAllReactions: (
|
|
2329
2682
|
channelId: string,
|
|
2330
2683
|
messageId: string,
|
|
2331
2684
|
options?: O,
|
|
2332
|
-
) =>
|
|
2685
|
+
) => RestResponse<any>
|
|
2333
2686
|
/** Deletes all the reactions for a given emoji on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event.
|
|
2334
2687
|
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
2335
2688
|
deleteAllReactionsForEmoji: (
|
|
@@ -2337,98 +2690,104 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2337
2690
|
messageId: string,
|
|
2338
2691
|
emoji: string,
|
|
2339
2692
|
options?: O,
|
|
2340
|
-
) =>
|
|
2341
|
-
/** Delete a
|
|
2693
|
+
) => RestResponse<any>
|
|
2694
|
+
/** Delete a rule. Returns a 204 on success. Fires an Auto Moderation Rule Delete Gateway event. */
|
|
2695
|
+
deleteAutoModerationRule: (
|
|
2696
|
+
guildId: string,
|
|
2697
|
+
autoModerationRuleId: string,
|
|
2698
|
+
options?: O,
|
|
2699
|
+
) => RestResponse<any>
|
|
2700
|
+
/** Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions */
|
|
2342
2701
|
deleteChannelPermission: (
|
|
2343
2702
|
channelId: string,
|
|
2344
2703
|
overwriteId: string,
|
|
2345
2704
|
options?: O,
|
|
2346
|
-
) =>
|
|
2705
|
+
) => RestResponse<any>
|
|
2347
2706
|
/** Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread). */
|
|
2348
|
-
deletecloseChannel: (channelId: string, options?: O) =>
|
|
2349
|
-
/** Deletes a followup message for an Interaction. Returns 204 No Content on success.
|
|
2707
|
+
deletecloseChannel: (channelId: string, options?: O) => RestResponse<Channel>
|
|
2708
|
+
/** Deletes a followup message for an Interaction. Returns 204 No Content on success. */
|
|
2350
2709
|
deleteFollowupMessage: (
|
|
2351
2710
|
applicationId: string,
|
|
2352
2711
|
interactionToken: string,
|
|
2353
2712
|
messageId: string,
|
|
2354
2713
|
options?: O,
|
|
2355
|
-
) =>
|
|
2714
|
+
) => RestResponse<any>
|
|
2356
2715
|
/** Deletes a global command. Returns 204 No Content on success. */
|
|
2357
2716
|
deleteGlobalApplicationCommand: (
|
|
2358
2717
|
applicationId: string,
|
|
2359
2718
|
commandId: string,
|
|
2360
2719
|
options?: O,
|
|
2361
|
-
) =>
|
|
2720
|
+
) => RestResponse<any>
|
|
2362
2721
|
/** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event. */
|
|
2363
|
-
deleteGuild: (guildId: string, options?: O) =>
|
|
2722
|
+
deleteGuild: (guildId: string, options?: O) => RestResponse<any>
|
|
2364
2723
|
/** Delete a guild command. Returns 204 No Content on success. */
|
|
2365
2724
|
deleteGuildApplicationCommand: (
|
|
2366
2725
|
applicationId: string,
|
|
2367
2726
|
guildId: string,
|
|
2368
2727
|
commandId: string,
|
|
2369
2728
|
options?: O,
|
|
2370
|
-
) =>
|
|
2729
|
+
) => RestResponse<any>
|
|
2371
2730
|
/** Delete the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event. */
|
|
2372
2731
|
deleteGuildEmoji: (
|
|
2373
2732
|
guildId: string,
|
|
2374
2733
|
emojiId: string,
|
|
2375
2734
|
options?: O,
|
|
2376
|
-
) =>
|
|
2377
|
-
/** Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires
|
|
2735
|
+
) => RestResponse<any>
|
|
2736
|
+
/** Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events. */
|
|
2378
2737
|
deleteGuildIntegration: (
|
|
2379
2738
|
guildId: string,
|
|
2380
2739
|
integrationId: string,
|
|
2381
2740
|
options?: O,
|
|
2382
|
-
) =>
|
|
2741
|
+
) => RestResponse<any>
|
|
2383
2742
|
/** Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event. */
|
|
2384
2743
|
deleteGuildRole: (
|
|
2385
2744
|
guildId: string,
|
|
2386
2745
|
roleId: string,
|
|
2387
2746
|
options?: O,
|
|
2388
|
-
) =>
|
|
2389
|
-
/** Delete a guild scheduled event. Returns a 204 on success. */
|
|
2747
|
+
) => RestResponse<any>
|
|
2748
|
+
/** Delete a guild scheduled event. Returns a 204 on success. Fires a Guild Scheduled Event Delete Gateway event. */
|
|
2390
2749
|
deleteGuildScheduledEvent: (
|
|
2391
2750
|
guildId: string,
|
|
2392
2751
|
guildScheduledEventId: string,
|
|
2393
2752
|
options?: O,
|
|
2394
|
-
) =>
|
|
2395
|
-
/** Delete the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. */
|
|
2753
|
+
) => RestResponse<any>
|
|
2754
|
+
/** Delete the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success. Fires a Guild Stickers Update Gateway event. */
|
|
2396
2755
|
deleteGuildSticker: (
|
|
2397
2756
|
guildId: string,
|
|
2398
2757
|
stickerId: string,
|
|
2399
2758
|
options?: O,
|
|
2400
|
-
) =>
|
|
2759
|
+
) => RestResponse<any>
|
|
2401
2760
|
/** Deletes the template. Requires the MANAGE_GUILD permission. Returns the deleted guild template object on success. */
|
|
2402
2761
|
deleteGuildTemplate: (
|
|
2403
2762
|
guildId: string,
|
|
2404
2763
|
templateCode: string,
|
|
2405
2764
|
options?: O,
|
|
2406
|
-
) =>
|
|
2407
|
-
/** Delete an invite. Requires the MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires
|
|
2408
|
-
deleteInvite: (inviteCode: string, options?: O) =>
|
|
2765
|
+
) => RestResponse<GuildTemplate>
|
|
2766
|
+
/** Delete an invite. Requires the MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires an Invite Delete Gateway event. */
|
|
2767
|
+
deleteInvite: (inviteCode: string, options?: O) => RestResponse<Invite>
|
|
2409
2768
|
/** Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Gateway event. */
|
|
2410
2769
|
deleteMessage: (
|
|
2411
2770
|
channelId: string,
|
|
2412
2771
|
messageId: string,
|
|
2413
2772
|
options?: O,
|
|
2414
|
-
) =>
|
|
2415
|
-
/** Deletes the initial Interaction response. Returns 204 No Content on success.
|
|
2773
|
+
) => RestResponse<any>
|
|
2774
|
+
/** Deletes the initial Interaction response. Returns 204 No Content on success. */
|
|
2416
2775
|
deleteOriginalInteractionResponse: (
|
|
2417
2776
|
applicationId: string,
|
|
2418
2777
|
interactionToken: string,
|
|
2419
2778
|
options?: O,
|
|
2420
|
-
) =>
|
|
2421
|
-
/** Delete a reaction the current user has made for the message. Returns a 204 empty response on success.
|
|
2779
|
+
) => RestResponse<any>
|
|
2780
|
+
/** Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
2422
2781
|
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
2423
2782
|
deleteOwnReaction: (
|
|
2424
2783
|
channelId: string,
|
|
2425
2784
|
messageId: string,
|
|
2426
2785
|
emoji: string,
|
|
2427
2786
|
options?: O,
|
|
2428
|
-
) =>
|
|
2429
|
-
/** Deletes the Stage instance. Returns 204 No Content. */
|
|
2430
|
-
deleteStageInstance: (channelId: string, options?: O) =>
|
|
2431
|
-
/** Deletes another user's reaction. This endpoint requires the
|
|
2787
|
+
) => RestResponse<any>
|
|
2788
|
+
/** Deletes the Stage instance. Returns 204 No Content. Fires a Stage Instance Delete Gateway event. */
|
|
2789
|
+
deleteStageInstance: (channelId: string, options?: O) => RestResponse<any>
|
|
2790
|
+
/** Deletes another user's reaction. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
2432
2791
|
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
2433
2792
|
deleteUserReaction: (
|
|
2434
2793
|
channelId: string,
|
|
@@ -2436,9 +2795,9 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2436
2795
|
emoji: string,
|
|
2437
2796
|
userId: string,
|
|
2438
2797
|
options?: O,
|
|
2439
|
-
) =>
|
|
2440
|
-
/** Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. Returns a 204 No Content response on success. */
|
|
2441
|
-
deleteWebhook: (webhookId: string, options?: O) =>
|
|
2798
|
+
) => RestResponse<any>
|
|
2799
|
+
/** Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. Returns a 204 No Content response on success. Fires a Webhooks Update Gateway event. */
|
|
2800
|
+
deleteWebhook: (webhookId: string, options?: O) => RestResponse<any>
|
|
2442
2801
|
/** Deletes a message that was created by the webhook. Returns a 204 No Content response on success. */
|
|
2443
2802
|
deleteWebhookMessage: (
|
|
2444
2803
|
webhookId: string,
|
|
@@ -2446,60 +2805,60 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2446
2805
|
messageId: string,
|
|
2447
2806
|
params?: Partial<DeleteWebhookMessageParams>,
|
|
2448
2807
|
options?: O,
|
|
2449
|
-
) =>
|
|
2808
|
+
) => RestResponse<any>
|
|
2450
2809
|
/** Same as above, except this call does not require authentication. */
|
|
2451
2810
|
deleteWebhookWithToken: (
|
|
2452
2811
|
webhookId: string,
|
|
2453
2812
|
webhookToken: string,
|
|
2454
2813
|
options?: O,
|
|
2455
|
-
) =>
|
|
2814
|
+
) => RestResponse<any>
|
|
2456
2815
|
editApplicationCommandPermissions: (
|
|
2457
2816
|
applicationId: string,
|
|
2458
2817
|
guildId: string,
|
|
2459
2818
|
commandId: string,
|
|
2460
2819
|
params?: Partial<EditApplicationCommandPermissionParams>,
|
|
2461
2820
|
options?: O,
|
|
2462
|
-
) =>
|
|
2463
|
-
/** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. For more information about permissions, see permissions. */
|
|
2821
|
+
) => RestResponse<GuildApplicationCommandPermission>
|
|
2822
|
+
/** Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions. */
|
|
2464
2823
|
editChannelPermissions: (
|
|
2465
2824
|
channelId: string,
|
|
2466
2825
|
overwriteId: string,
|
|
2467
2826
|
params?: Partial<EditChannelPermissionParams>,
|
|
2468
2827
|
options?: O,
|
|
2469
|
-
) =>
|
|
2828
|
+
) => RestResponse<any>
|
|
2470
2829
|
/** Edits a followup message for an Interaction. Functions the same as Edit Webhook Message. */
|
|
2471
2830
|
editFollowupMessage: (
|
|
2472
2831
|
applicationId: string,
|
|
2473
2832
|
interactionToken: string,
|
|
2474
2833
|
messageId: string,
|
|
2475
2834
|
options?: O,
|
|
2476
|
-
) =>
|
|
2835
|
+
) => RestResponse<any>
|
|
2477
2836
|
editGlobalApplicationCommand: (
|
|
2478
2837
|
applicationId: string,
|
|
2479
2838
|
commandId: string,
|
|
2480
2839
|
params?: Partial<EditGlobalApplicationCommandParams>,
|
|
2481
2840
|
options?: O,
|
|
2482
|
-
) =>
|
|
2841
|
+
) => RestResponse<ApplicationCommand>
|
|
2483
2842
|
editGuildApplicationCommand: (
|
|
2484
2843
|
applicationId: string,
|
|
2485
2844
|
guildId: string,
|
|
2486
2845
|
commandId: string,
|
|
2487
2846
|
params?: Partial<EditGuildApplicationCommandParams>,
|
|
2488
2847
|
options?: O,
|
|
2489
|
-
) =>
|
|
2848
|
+
) => RestResponse<ApplicationCommand>
|
|
2490
2849
|
/** Edit a previously sent message. The fields content, embeds, and flags can be edited by the original message author. Other users can only edit flags and only if they have the MANAGE_MESSAGES permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags documented in the table below may be modified by users (unsupported flag changes are currently ignored without error). */
|
|
2491
2850
|
editMessage: (
|
|
2492
2851
|
channelId: string,
|
|
2493
2852
|
messageId: string,
|
|
2494
2853
|
params?: Partial<EditMessageParams>,
|
|
2495
2854
|
options?: O,
|
|
2496
|
-
) =>
|
|
2855
|
+
) => RestResponse<Message>
|
|
2497
2856
|
/** Edits the initial Interaction response. Functions the same as Edit Webhook Message. */
|
|
2498
2857
|
editOriginalInteractionResponse: (
|
|
2499
2858
|
applicationId: string,
|
|
2500
2859
|
interactionToken: string,
|
|
2501
2860
|
options?: O,
|
|
2502
|
-
) =>
|
|
2861
|
+
) => RestResponse<any>
|
|
2503
2862
|
/** Edits a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
2504
2863
|
editWebhookMessage: (
|
|
2505
2864
|
webhookId: string,
|
|
@@ -2507,223 +2866,251 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2507
2866
|
messageId: string,
|
|
2508
2867
|
params?: Partial<EditWebhookMessageParams>,
|
|
2509
2868
|
options?: O,
|
|
2510
|
-
) =>
|
|
2869
|
+
) => RestResponse<Message>
|
|
2511
2870
|
/** Add a new webhook to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring. */
|
|
2512
2871
|
executeGitHubCompatibleWebhook: (
|
|
2513
2872
|
webhookId: string,
|
|
2514
2873
|
webhookToken: string,
|
|
2515
2874
|
options?: O,
|
|
2516
|
-
) =>
|
|
2875
|
+
) => RestResponse<any>
|
|
2517
2876
|
/** Refer to Slack's documentation for more information. We do not support Slack's channel, icon_emoji, mrkdwn, or mrkdwn_in properties. */
|
|
2518
2877
|
executeSlackCompatibleWebhook: (
|
|
2519
2878
|
webhookId: string,
|
|
2520
2879
|
webhookToken: string,
|
|
2521
2880
|
options?: O,
|
|
2522
|
-
) =>
|
|
2881
|
+
) => RestResponse<any>
|
|
2523
2882
|
/** Refer to Uploading Files for details on attachments and multipart/form-data requests. Returns a message or 204 No Content depending on the wait query parameter. */
|
|
2524
2883
|
executeWebhook: (
|
|
2525
2884
|
webhookId: string,
|
|
2526
2885
|
webhookToken: string,
|
|
2527
2886
|
params?: Partial<ExecuteWebhookParams>,
|
|
2528
2887
|
options?: O,
|
|
2529
|
-
) =>
|
|
2530
|
-
/** Follow
|
|
2531
|
-
|
|
2888
|
+
) => RestResponse<any>
|
|
2889
|
+
/** Follow an Announcement Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object. Fires a Webhooks Update Gateway event for the target channel. */
|
|
2890
|
+
followAnnouncementChannel: (
|
|
2532
2891
|
channelId: string,
|
|
2533
|
-
params?: Partial<
|
|
2892
|
+
params?: Partial<FollowAnnouncementChannelParams>,
|
|
2534
2893
|
options?: O,
|
|
2535
|
-
) =>
|
|
2536
|
-
/** Fetches
|
|
2894
|
+
) => RestResponse<FollowedChannel>
|
|
2895
|
+
/** Fetches permissions for a specific command for your application in a guild. Returns a guild application command permissions object. */
|
|
2537
2896
|
getApplicationCommandPermissions: (
|
|
2538
2897
|
applicationId: string,
|
|
2539
2898
|
guildId: string,
|
|
2540
2899
|
commandId: string,
|
|
2541
2900
|
options?: O,
|
|
2542
|
-
) =>
|
|
2901
|
+
) => RestResponse<GuildApplicationCommandPermission>
|
|
2902
|
+
/** Get a single rule. Returns an auto moderation rule object. */
|
|
2903
|
+
getAutoModerationRule: (
|
|
2904
|
+
guildId: string,
|
|
2905
|
+
autoModerationRuleId: string,
|
|
2906
|
+
options?: O,
|
|
2907
|
+
) => RestResponse<AutoModerationRule>
|
|
2543
2908
|
/** Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result. */
|
|
2544
|
-
getChannel: (channelId: string, options?: O) =>
|
|
2909
|
+
getChannel: (channelId: string, options?: O) => RestResponse<Channel>
|
|
2545
2910
|
/** Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the MANAGE_CHANNELS permission. */
|
|
2546
|
-
getChannelInvites: (channelId: string, options?: O) =>
|
|
2547
|
-
/** Returns a specific message in the channel. If operating on a guild channel, this endpoint requires the
|
|
2911
|
+
getChannelInvites: (channelId: string, options?: O) => RestResponse<Invite[]>
|
|
2912
|
+
/** Returns a specific message in the channel. If operating on a guild channel, this endpoint requires the READ_MESSAGE_HISTORY permission to be present on the current user. Returns a message object on success. */
|
|
2548
2913
|
getChannelMessage: (
|
|
2549
2914
|
channelId: string,
|
|
2550
2915
|
messageId: string,
|
|
2551
2916
|
options?: O,
|
|
2552
|
-
) =>
|
|
2553
|
-
/** Returns the messages for a channel. If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user. If the current user is missing the
|
|
2917
|
+
) => RestResponse<Message>
|
|
2918
|
+
/** Returns the messages for a channel. If operating on a guild channel, this endpoint requires the VIEW_CHANNEL permission to be present on the current user. If the current user is missing the READ_MESSAGE_HISTORY permission in the channel then this will return no messages (since they cannot read the message history). Returns an array of message objects on success. */
|
|
2554
2919
|
getChannelMessages: (
|
|
2555
2920
|
channelId: string,
|
|
2556
2921
|
params?: Partial<GetChannelMessageParams>,
|
|
2557
2922
|
options?: O,
|
|
2558
|
-
) =>
|
|
2923
|
+
) => RestResponse<Message[]>
|
|
2559
2924
|
/** Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission. */
|
|
2560
|
-
getChannelWebhooks: (
|
|
2925
|
+
getChannelWebhooks: (
|
|
2926
|
+
channelId: string,
|
|
2927
|
+
options?: O,
|
|
2928
|
+
) => RestResponse<Webhook[]>
|
|
2929
|
+
/** Returns info about the current authorization. Requires authentication with a bearer token. */
|
|
2930
|
+
getCurrentAuthorizationInformation: (
|
|
2931
|
+
options?: O,
|
|
2932
|
+
) => RestResponse<GetCurrentAuthorizationInformationResponse>
|
|
2933
|
+
/** Returns the bot's application object. */
|
|
2934
|
+
getCurrentBotApplicationInformation: (
|
|
2935
|
+
options?: O,
|
|
2936
|
+
) => RestResponse<Application>
|
|
2561
2937
|
/** Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email. */
|
|
2562
|
-
getCurrentUser: (options?: O) =>
|
|
2938
|
+
getCurrentUser: (options?: O) => RestResponse<User>
|
|
2563
2939
|
/** Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope. */
|
|
2564
2940
|
getCurrentUserGuildMember: (
|
|
2565
2941
|
guildId: string,
|
|
2566
2942
|
options?: O,
|
|
2567
|
-
) =>
|
|
2943
|
+
) => RestResponse<GuildMember>
|
|
2568
2944
|
/** Returns a list of partial guild objects the current user is a member of. Requires the guilds OAuth2 scope. */
|
|
2569
2945
|
getCurrentUserGuilds: (
|
|
2570
2946
|
params?: Partial<GetCurrentUserGuildParams>,
|
|
2571
2947
|
options?: O,
|
|
2572
|
-
) =>
|
|
2948
|
+
) => RestResponse<Guild[]>
|
|
2573
2949
|
/** Returns a followup message for an Interaction. Functions the same as Get Webhook Message. */
|
|
2574
2950
|
getFollowupMessage: (
|
|
2575
2951
|
applicationId: string,
|
|
2576
2952
|
interactionToken: string,
|
|
2577
2953
|
messageId: string,
|
|
2578
2954
|
options?: O,
|
|
2579
|
-
) =>
|
|
2580
|
-
getGateway: (options?: O) =>
|
|
2581
|
-
getGatewayBot: (options?: O) =>
|
|
2955
|
+
) => RestResponse<any>
|
|
2956
|
+
getGateway: (options?: O) => RestResponse<any>
|
|
2957
|
+
getGatewayBot: (options?: O) => RestResponse<GetGatewayBotResponse>
|
|
2582
2958
|
/** Fetch a global command for your application. Returns an application command object. */
|
|
2583
2959
|
getGlobalApplicationCommand: (
|
|
2584
2960
|
applicationId: string,
|
|
2585
2961
|
commandId: string,
|
|
2586
2962
|
options?: O,
|
|
2587
|
-
) =>
|
|
2588
|
-
/** Fetch all of the global commands for your application. Returns an array of application command objects. */
|
|
2963
|
+
) => RestResponse<ApplicationCommand>
|
|
2589
2964
|
getGlobalApplicationCommands: (
|
|
2590
2965
|
applicationId: string,
|
|
2966
|
+
params?: Partial<GetGlobalApplicationCommandParams>,
|
|
2591
2967
|
options?: O,
|
|
2592
|
-
) =>
|
|
2968
|
+
) => RestResponse<ApplicationCommand[]>
|
|
2593
2969
|
/** Returns the guild object for the given id. If with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild. */
|
|
2594
2970
|
getGuild: (
|
|
2595
2971
|
guildId: string,
|
|
2596
2972
|
params?: Partial<GetGuildParams>,
|
|
2597
2973
|
options?: O,
|
|
2598
|
-
) =>
|
|
2974
|
+
) => RestResponse<Guild>
|
|
2599
2975
|
/** Fetch a guild command for your application. Returns an application command object. */
|
|
2600
2976
|
getGuildApplicationCommand: (
|
|
2601
2977
|
applicationId: string,
|
|
2602
2978
|
guildId: string,
|
|
2603
2979
|
commandId: string,
|
|
2604
2980
|
options?: O,
|
|
2605
|
-
) =>
|
|
2606
|
-
/** Fetches
|
|
2981
|
+
) => RestResponse<ApplicationCommand>
|
|
2982
|
+
/** Fetches permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects. */
|
|
2607
2983
|
getGuildApplicationCommandPermissions: (
|
|
2608
2984
|
applicationId: string,
|
|
2609
2985
|
guildId: string,
|
|
2610
2986
|
options?: O,
|
|
2611
|
-
) =>
|
|
2612
|
-
/** Fetch all of the guild commands for your application for a specific guild. Returns an array of application command objects. */
|
|
2987
|
+
) => RestResponse<GuildApplicationCommandPermission[]>
|
|
2613
2988
|
getGuildApplicationCommands: (
|
|
2614
2989
|
applicationId: string,
|
|
2615
2990
|
guildId: string,
|
|
2991
|
+
params?: Partial<GetGuildApplicationCommandParams>,
|
|
2616
2992
|
options?: O,
|
|
2617
|
-
) =>
|
|
2618
|
-
/** Returns an audit log object for the guild. Requires the
|
|
2993
|
+
) => RestResponse<ApplicationCommand[]>
|
|
2994
|
+
/** Returns an audit log object for the guild. Requires the VIEW_AUDIT_LOG permission. */
|
|
2619
2995
|
getGuildAuditLog: (
|
|
2620
2996
|
guildId: string,
|
|
2621
2997
|
params?: Partial<GetGuildAuditLogParams>,
|
|
2622
2998
|
options?: O,
|
|
2623
|
-
) =>
|
|
2999
|
+
) => RestResponse<AuditLog>
|
|
2624
3000
|
/** Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission. */
|
|
2625
|
-
getGuildBan: (
|
|
3001
|
+
getGuildBan: (
|
|
3002
|
+
guildId: string,
|
|
3003
|
+
userId: string,
|
|
3004
|
+
options?: O,
|
|
3005
|
+
) => RestResponse<Ban>
|
|
2626
3006
|
/** Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission. */
|
|
2627
|
-
getGuildBans: (
|
|
3007
|
+
getGuildBans: (
|
|
3008
|
+
guildId: string,
|
|
3009
|
+
params?: Partial<GetGuildBanParams>,
|
|
3010
|
+
options?: O,
|
|
3011
|
+
) => RestResponse<Ban[]>
|
|
2628
3012
|
/** Returns a list of guild channel objects. Does not include threads. */
|
|
2629
|
-
getGuildChannels: (guildId: string, options?: O) =>
|
|
3013
|
+
getGuildChannels: (guildId: string, options?: O) => RestResponse<Channel[]>
|
|
2630
3014
|
/** Returns an emoji object for the given guild and emoji IDs. */
|
|
2631
3015
|
getGuildEmoji: (
|
|
2632
3016
|
guildId: string,
|
|
2633
3017
|
emojiId: string,
|
|
2634
3018
|
options?: O,
|
|
2635
|
-
) =>
|
|
3019
|
+
) => RestResponse<Emoji>
|
|
2636
3020
|
/** Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission. */
|
|
2637
3021
|
getGuildIntegrations: (
|
|
2638
3022
|
guildId: string,
|
|
2639
3023
|
options?: O,
|
|
2640
|
-
) =>
|
|
3024
|
+
) => RestResponse<Integration[]>
|
|
2641
3025
|
/** Returns a list of invite objects (with invite metadata) for the guild. Requires the MANAGE_GUILD permission. */
|
|
2642
|
-
getGuildInvites: (guildId: string, options?: O) =>
|
|
3026
|
+
getGuildInvites: (guildId: string, options?: O) => RestResponse<Invite[]>
|
|
2643
3027
|
/** Returns a guild member object for the specified user. */
|
|
2644
3028
|
getGuildMember: (
|
|
2645
3029
|
guildId: string,
|
|
2646
3030
|
userId: string,
|
|
2647
3031
|
options?: O,
|
|
2648
|
-
) =>
|
|
3032
|
+
) => RestResponse<GuildMember>
|
|
2649
3033
|
/** Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be lurkable. */
|
|
2650
|
-
getGuildPreview: (guildId: string, options?: O) =>
|
|
2651
|
-
/** Returns an object with one
|
|
3034
|
+
getGuildPreview: (guildId: string, options?: O) => RestResponse<GuildPreview>
|
|
3035
|
+
/** Returns an object with one pruned key indicating the number of members that would be removed in a prune operation. Requires the KICK_MEMBERS permission. */
|
|
2652
3036
|
getGuildPruneCount: (
|
|
2653
3037
|
guildId: string,
|
|
2654
3038
|
params?: Partial<GetGuildPruneCountParams>,
|
|
2655
3039
|
options?: O,
|
|
2656
|
-
) =>
|
|
3040
|
+
) => RestResponse<any>
|
|
2657
3041
|
/** Returns a list of role objects for the guild. */
|
|
2658
|
-
getGuildRoles: (guildId: string, options?: O) =>
|
|
3042
|
+
getGuildRoles: (guildId: string, options?: O) => RestResponse<Role[]>
|
|
2659
3043
|
/** Get a guild scheduled event. Returns a guild scheduled event object on success. */
|
|
2660
3044
|
getGuildScheduledEvent: (
|
|
2661
3045
|
guildId: string,
|
|
2662
3046
|
guildScheduledEventId: string,
|
|
2663
3047
|
params?: Partial<GetGuildScheduledEventParams>,
|
|
2664
3048
|
options?: O,
|
|
2665
|
-
) =>
|
|
3049
|
+
) => RestResponse<GuildScheduledEvent>
|
|
2666
3050
|
/** Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the with_member query parameter is set. */
|
|
2667
3051
|
getGuildScheduledEventUsers: (
|
|
2668
3052
|
guildId: string,
|
|
2669
3053
|
guildScheduledEventId: string,
|
|
2670
3054
|
params?: Partial<GetGuildScheduledEventUserParams>,
|
|
2671
3055
|
options?: O,
|
|
2672
|
-
) =>
|
|
3056
|
+
) => RestResponse<GuildScheduledEventUser[]>
|
|
2673
3057
|
/** Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
|
|
2674
3058
|
getGuildSticker: (
|
|
2675
3059
|
guildId: string,
|
|
2676
3060
|
stickerId: string,
|
|
2677
3061
|
options?: O,
|
|
2678
|
-
) =>
|
|
3062
|
+
) => RestResponse<Sticker>
|
|
2679
3063
|
/** Returns a guild template object for the given code. */
|
|
2680
3064
|
getGuildTemplate: (
|
|
2681
3065
|
templateCode: string,
|
|
2682
3066
|
options?: O,
|
|
2683
|
-
) =>
|
|
3067
|
+
) => RestResponse<GuildTemplate>
|
|
2684
3068
|
/** Returns an array of guild template objects. Requires the MANAGE_GUILD permission. */
|
|
2685
|
-
getGuildTemplates: (
|
|
3069
|
+
getGuildTemplates: (
|
|
3070
|
+
guildId: string,
|
|
3071
|
+
options?: O,
|
|
3072
|
+
) => RestResponse<GuildTemplate[]>
|
|
2686
3073
|
/** Returns a partial invite object for guilds with that feature enabled. Requires the MANAGE_GUILD permission. code will be null if a vanity url for the guild is not set. */
|
|
2687
|
-
getGuildVanityUrl: (guildId: string, options?: O) =>
|
|
3074
|
+
getGuildVanityUrl: (guildId: string, options?: O) => RestResponse<Invite>
|
|
2688
3075
|
/** Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled. */
|
|
2689
3076
|
getGuildVoiceRegions: (
|
|
2690
3077
|
guildId: string,
|
|
2691
3078
|
options?: O,
|
|
2692
|
-
) =>
|
|
3079
|
+
) => RestResponse<VoiceRegion[]>
|
|
2693
3080
|
/** Returns a list of guild webhook objects. Requires the MANAGE_WEBHOOKS permission. */
|
|
2694
|
-
getGuildWebhooks: (guildId: string, options?: O) =>
|
|
3081
|
+
getGuildWebhooks: (guildId: string, options?: O) => RestResponse<Webhook[]>
|
|
2695
3082
|
/** Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required. */
|
|
2696
3083
|
getGuildWelcomeScreen: (
|
|
2697
3084
|
guildId: string,
|
|
2698
3085
|
options?: O,
|
|
2699
|
-
) =>
|
|
3086
|
+
) => RestResponse<WelcomeScreen>
|
|
2700
3087
|
/** Returns the widget for the guild. */
|
|
2701
|
-
getGuildWidget: (guildId: string, options?: O) =>
|
|
3088
|
+
getGuildWidget: (guildId: string, options?: O) => RestResponse<GuildWidget>
|
|
2702
3089
|
/** Returns a PNG image widget for the guild. Requires no permissions or authentication. */
|
|
2703
3090
|
getGuildWidgetImage: (
|
|
2704
3091
|
guildId: string,
|
|
2705
3092
|
params?: Partial<GetGuildWidgetImageParams>,
|
|
2706
3093
|
options?: O,
|
|
2707
|
-
) =>
|
|
3094
|
+
) => RestResponse<any>
|
|
2708
3095
|
/** Returns a guild widget settings object. Requires the MANAGE_GUILD permission. */
|
|
2709
3096
|
getGuildWidgetSettings: (
|
|
2710
3097
|
guildId: string,
|
|
2711
3098
|
options?: O,
|
|
2712
|
-
) =>
|
|
3099
|
+
) => RestResponse<GuildWidgetSetting>
|
|
2713
3100
|
/** Returns an invite object for the given code. */
|
|
2714
3101
|
getInvite: (
|
|
2715
3102
|
inviteCode: string,
|
|
2716
3103
|
params?: Partial<GetInviteParams>,
|
|
2717
3104
|
options?: O,
|
|
2718
|
-
) =>
|
|
3105
|
+
) => RestResponse<Invite>
|
|
2719
3106
|
/** Returns the initial Interaction response. Functions the same as Get Webhook Message. */
|
|
2720
3107
|
getOriginalInteractionResponse: (
|
|
2721
3108
|
applicationId: string,
|
|
2722
3109
|
interactionToken: string,
|
|
2723
3110
|
options?: O,
|
|
2724
|
-
) =>
|
|
3111
|
+
) => RestResponse<any>
|
|
2725
3112
|
/** Returns all pinned messages in the channel as an array of message objects. */
|
|
2726
|
-
getPinnedMessages: (channelId: string, options?: O) =>
|
|
3113
|
+
getPinnedMessages: (channelId: string, options?: O) => RestResponse<Message[]>
|
|
2727
3114
|
/** Get a list of users that reacted with this emoji. Returns an array of user objects on success.
|
|
2728
3115
|
The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id. */
|
|
2729
3116
|
getReactions: (
|
|
@@ -2732,23 +3119,23 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2732
3119
|
emoji: string,
|
|
2733
3120
|
params?: Partial<GetReactionParams>,
|
|
2734
3121
|
options?: O,
|
|
2735
|
-
) =>
|
|
3122
|
+
) => RestResponse<User[]>
|
|
2736
3123
|
/** Gets the stage instance associated with the Stage channel, if it exists. */
|
|
2737
|
-
getStageInstance: (channelId: string, options?: O) =>
|
|
3124
|
+
getStageInstance: (channelId: string, options?: O) => RestResponse<any>
|
|
2738
3125
|
/** Returns a sticker object for the given sticker ID. */
|
|
2739
|
-
getSticker: (stickerId: string, options?: O) =>
|
|
3126
|
+
getSticker: (stickerId: string, options?: O) => RestResponse<Sticker>
|
|
2740
3127
|
/** Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise. */
|
|
2741
3128
|
getThreadMember: (
|
|
2742
3129
|
channelId: string,
|
|
2743
3130
|
userId: string,
|
|
2744
3131
|
options?: O,
|
|
2745
|
-
) =>
|
|
3132
|
+
) => RestResponse<ThreadMember>
|
|
2746
3133
|
/** Returns a user object for a given user ID. */
|
|
2747
|
-
getUser: (userId: string, options?: O) =>
|
|
3134
|
+
getUser: (userId: string, options?: O) => RestResponse<User>
|
|
2748
3135
|
/** Returns a list of connection objects. Requires the connections OAuth2 scope. */
|
|
2749
|
-
getUserConnections: (options?: O) =>
|
|
3136
|
+
getUserConnections: (options?: O) => RestResponse<Connection[]>
|
|
2750
3137
|
/** Returns the new webhook object for the given id. */
|
|
2751
|
-
getWebhook: (webhookId: string, options?: O) =>
|
|
3138
|
+
getWebhook: (webhookId: string, options?: O) => RestResponse<Webhook>
|
|
2752
3139
|
/** Returns a previously-sent webhook message from the same token. Returns a message object on success. */
|
|
2753
3140
|
getWebhookMessage: (
|
|
2754
3141
|
webhookId: string,
|
|
@@ -2756,273 +3143,296 @@ The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji
|
|
|
2756
3143
|
messageId: string,
|
|
2757
3144
|
params?: Partial<GetWebhookMessageParams>,
|
|
2758
3145
|
options?: O,
|
|
2759
|
-
) =>
|
|
3146
|
+
) => RestResponse<Message>
|
|
2760
3147
|
/** Same as above, except this call does not require authentication and returns no user in the webhook object. */
|
|
2761
3148
|
getWebhookWithToken: (
|
|
2762
3149
|
webhookId: string,
|
|
2763
3150
|
webhookToken: string,
|
|
2764
3151
|
options?: O,
|
|
2765
|
-
) =>
|
|
3152
|
+
) => RestResponse<any>
|
|
2766
3153
|
/** Adds a recipient to a Group DM using their access token. */
|
|
2767
3154
|
groupDmAddRecipient: (
|
|
2768
3155
|
channelId: string,
|
|
2769
3156
|
userId: string,
|
|
2770
3157
|
params?: Partial<GroupDmAddRecipientParams>,
|
|
2771
3158
|
options?: O,
|
|
2772
|
-
) =>
|
|
3159
|
+
) => RestResponse<any>
|
|
2773
3160
|
/** Removes a recipient from a Group DM. */
|
|
2774
3161
|
groupDmRemoveRecipient: (
|
|
2775
3162
|
channelId: string,
|
|
2776
3163
|
userId: string,
|
|
2777
3164
|
options?: O,
|
|
2778
|
-
) =>
|
|
3165
|
+
) => RestResponse<any>
|
|
2779
3166
|
/** Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
|
|
2780
|
-
joinThread: (channelId: string, options?: O) =>
|
|
3167
|
+
joinThread: (channelId: string, options?: O) => RestResponse<any>
|
|
2781
3168
|
/** Leave a guild. Returns a 204 empty response on success. */
|
|
2782
|
-
leaveGuild: (guildId: string, options?: O) =>
|
|
3169
|
+
leaveGuild: (guildId: string, options?: O) => RestResponse<any>
|
|
2783
3170
|
/** Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
|
|
2784
|
-
leaveThread: (channelId: string, options?: O) =>
|
|
2785
|
-
/** Returns all active threads in the channel, including public and private threads. Threads are ordered by their id, in descending order. */
|
|
2786
|
-
listActiveThreads: (
|
|
2787
|
-
channelId: string,
|
|
2788
|
-
options?: O,
|
|
2789
|
-
) => Response<ListActiveThreadResponse>
|
|
3171
|
+
leaveThread: (channelId: string, options?: O) => RestResponse<any>
|
|
2790
3172
|
/** Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order. */
|
|
2791
|
-
|
|
3173
|
+
listActiveGuildThreads: (
|
|
2792
3174
|
guildId: string,
|
|
2793
3175
|
options?: O,
|
|
2794
|
-
) =>
|
|
3176
|
+
) => RestResponse<ListActiveGuildThreadResponse>
|
|
3177
|
+
/** Get a list of all rules currently configured for the guild. Returns a list of auto moderation rule objects for the given guild. */
|
|
3178
|
+
listAutoModerationRulesForGuild: (
|
|
3179
|
+
guildId: string,
|
|
3180
|
+
options?: O,
|
|
3181
|
+
) => RestResponse<AutoModerationRule[]>
|
|
2795
3182
|
/** Returns a list of emoji objects for the given guild. */
|
|
2796
|
-
listGuildEmojis: (guildId: string, options?: O) =>
|
|
3183
|
+
listGuildEmojis: (guildId: string, options?: O) => RestResponse<Emoji[]>
|
|
2797
3184
|
/** Returns a list of guild member objects that are members of the guild. */
|
|
2798
3185
|
listGuildMembers: (
|
|
2799
3186
|
guildId: string,
|
|
2800
3187
|
params?: Partial<ListGuildMemberParams>,
|
|
2801
3188
|
options?: O,
|
|
2802
|
-
) =>
|
|
3189
|
+
) => RestResponse<GuildMember[]>
|
|
2803
3190
|
/** Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_EMOJIS_AND_STICKERS permission. */
|
|
2804
|
-
listGuildStickers: (guildId: string, options?: O) =>
|
|
2805
|
-
/** Returns archived threads in the channel that are of type
|
|
3191
|
+
listGuildStickers: (guildId: string, options?: O) => RestResponse<Sticker[]>
|
|
3192
|
+
/** Returns archived threads in the channel that are of type PRIVATE_THREAD, and the user has joined. Threads are ordered by their id, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
|
|
2806
3193
|
listJoinedPrivateArchivedThreads: (
|
|
2807
3194
|
channelId: string,
|
|
2808
3195
|
params?: Partial<ListJoinedPrivateArchivedThreadParams>,
|
|
2809
3196
|
options?: O,
|
|
2810
|
-
) =>
|
|
3197
|
+
) => RestResponse<ListJoinedPrivateArchivedThreadResponse>
|
|
2811
3198
|
/** Returns the list of sticker packs available to Nitro subscribers. */
|
|
2812
|
-
listNitroStickerPacks: (options?: O) =>
|
|
2813
|
-
/** Returns archived threads in the channel that are of type
|
|
3199
|
+
listNitroStickerPacks: (options?: O) => RestResponse<any>
|
|
3200
|
+
/** Returns archived threads in the channel that are of type PRIVATE_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires both the READ_MESSAGE_HISTORY and MANAGE_THREADS permissions. */
|
|
2814
3201
|
listPrivateArchivedThreads: (
|
|
2815
3202
|
channelId: string,
|
|
2816
3203
|
params?: Partial<ListPrivateArchivedThreadParams>,
|
|
2817
3204
|
options?: O,
|
|
2818
|
-
) =>
|
|
2819
|
-
/** Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type
|
|
3205
|
+
) => RestResponse<ListPrivateArchivedThreadResponse>
|
|
3206
|
+
/** Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type PUBLIC_THREAD. When called on a GUILD_ANNOUNCEMENT channel returns threads of type ANNOUNCEMENT_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires the READ_MESSAGE_HISTORY permission. */
|
|
2820
3207
|
listPublicArchivedThreads: (
|
|
2821
3208
|
channelId: string,
|
|
2822
3209
|
params?: Partial<ListPublicArchivedThreadParams>,
|
|
2823
3210
|
options?: O,
|
|
2824
|
-
) =>
|
|
3211
|
+
) => RestResponse<ListPublicArchivedThreadResponse>
|
|
2825
3212
|
/** Returns a list of guild scheduled event objects for the given guild. */
|
|
2826
3213
|
listScheduledEventsForGuild: (
|
|
2827
3214
|
guildId: string,
|
|
2828
3215
|
params?: Partial<ListScheduledEventsForGuildParams>,
|
|
2829
3216
|
options?: O,
|
|
2830
|
-
) =>
|
|
3217
|
+
) => RestResponse<GuildScheduledEvent[]>
|
|
2831
3218
|
/** Returns array of thread members objects that are members of the thread. */
|
|
2832
3219
|
listThreadMembers: (
|
|
2833
3220
|
channelId: string,
|
|
2834
3221
|
options?: O,
|
|
2835
|
-
) =>
|
|
3222
|
+
) => RestResponse<ThreadMember[]>
|
|
2836
3223
|
/** Returns an array of voice region objects that can be used when setting a voice or stage channel's rtc_region. */
|
|
2837
|
-
listVoiceRegions: (options?: O) =>
|
|
3224
|
+
listVoiceRegions: (options?: O) => RestResponse<VoiceRegion[]>
|
|
3225
|
+
/** Modify an existing rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Update Gateway event. */
|
|
3226
|
+
modifyAutoModerationRule: (
|
|
3227
|
+
guildId: string,
|
|
3228
|
+
autoModerationRuleId: string,
|
|
3229
|
+
params?: Partial<ModifyAutoModerationRuleParams>,
|
|
3230
|
+
options?: O,
|
|
3231
|
+
) => RestResponse<AutoModerationRule>
|
|
2838
3232
|
/** Update a channel's settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. All JSON parameters are optional. */
|
|
2839
3233
|
modifyChannel: (
|
|
2840
3234
|
channelId: string,
|
|
2841
3235
|
params?: Partial<ModifyChannelParams>,
|
|
2842
3236
|
options?: O,
|
|
2843
|
-
) =>
|
|
3237
|
+
) => RestResponse<Channel>
|
|
2844
3238
|
/** Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event. */
|
|
2845
3239
|
modifyCurrentMember: (
|
|
2846
3240
|
guildId: string,
|
|
2847
3241
|
params?: Partial<ModifyCurrentMemberParams>,
|
|
2848
3242
|
options?: O,
|
|
2849
|
-
) =>
|
|
2850
|
-
/** Modify the requester's user account settings. Returns a user object on success. */
|
|
3243
|
+
) => RestResponse<any>
|
|
3244
|
+
/** Modify the requester's user account settings. Returns a user object on success. Fires a User Update Gateway event. */
|
|
2851
3245
|
modifyCurrentUser: (
|
|
2852
3246
|
params?: Partial<ModifyCurrentUserParams>,
|
|
2853
3247
|
options?: O,
|
|
2854
|
-
) =>
|
|
3248
|
+
) => RestResponse<User>
|
|
2855
3249
|
modifyCurrentUserNick: (
|
|
2856
3250
|
guildId: string,
|
|
2857
3251
|
params?: Partial<ModifyCurrentUserNickParams>,
|
|
2858
3252
|
options?: O,
|
|
2859
|
-
) =>
|
|
2860
|
-
/** Updates the current user's voice state. Returns 204 No Content on success. */
|
|
3253
|
+
) => RestResponse<any>
|
|
3254
|
+
/** Updates the current user's voice state. Returns 204 No Content on success. Fires a Voice State Update Gateway event. */
|
|
2861
3255
|
modifyCurrentUserVoiceState: (
|
|
2862
3256
|
guildId: string,
|
|
2863
3257
|
params?: Partial<ModifyCurrentUserVoiceStateParams>,
|
|
2864
3258
|
options?: O,
|
|
2865
|
-
) =>
|
|
3259
|
+
) => RestResponse<any>
|
|
2866
3260
|
/** Modify a guild's settings. Requires the MANAGE_GUILD permission. Returns the updated guild object on success. Fires a Guild Update Gateway event. */
|
|
2867
3261
|
modifyGuild: (
|
|
2868
3262
|
guildId: string,
|
|
2869
3263
|
params?: Partial<ModifyGuildParams>,
|
|
2870
3264
|
options?: O,
|
|
2871
|
-
) =>
|
|
3265
|
+
) => RestResponse<Guild>
|
|
2872
3266
|
/** Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events. */
|
|
2873
3267
|
modifyGuildChannelPositions: (
|
|
2874
3268
|
guildId: string,
|
|
2875
3269
|
params?: Partial<ModifyGuildChannelPositionParams>,
|
|
2876
3270
|
options?: O,
|
|
2877
|
-
) =>
|
|
3271
|
+
) => RestResponse<any>
|
|
2878
3272
|
/** Modify the given emoji. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */
|
|
2879
3273
|
modifyGuildEmoji: (
|
|
2880
3274
|
guildId: string,
|
|
2881
3275
|
emojiId: string,
|
|
2882
3276
|
params?: Partial<ModifyGuildEmojiParams>,
|
|
2883
3277
|
options?: O,
|
|
2884
|
-
) =>
|
|
3278
|
+
) => RestResponse<Emoji>
|
|
2885
3279
|
/** Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice. */
|
|
2886
3280
|
modifyGuildMember: (
|
|
2887
3281
|
guildId: string,
|
|
2888
3282
|
userId: string,
|
|
2889
3283
|
params?: Partial<ModifyGuildMemberParams>,
|
|
2890
3284
|
options?: O,
|
|
2891
|
-
) =>
|
|
3285
|
+
) => RestResponse<GuildMember>
|
|
3286
|
+
/** Modify a guild's MFA level. Requires guild ownership. Returns the updated level on success. Fires a Guild Update Gateway event. */
|
|
3287
|
+
modifyGuildMfaLevel: (
|
|
3288
|
+
guildId: string,
|
|
3289
|
+
params?: Partial<ModifyGuildMfaLevelParams>,
|
|
3290
|
+
options?: O,
|
|
3291
|
+
) => RestResponse<MfaLevel>
|
|
2892
3292
|
/** Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event. */
|
|
2893
3293
|
modifyGuildRole: (
|
|
2894
3294
|
guildId: string,
|
|
2895
3295
|
roleId: string,
|
|
2896
3296
|
params?: Partial<ModifyGuildRoleParams>,
|
|
2897
3297
|
options?: O,
|
|
2898
|
-
) =>
|
|
3298
|
+
) => RestResponse<Role>
|
|
2899
3299
|
/** Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events. */
|
|
2900
3300
|
modifyGuildRolePositions: (
|
|
2901
3301
|
guildId: string,
|
|
2902
3302
|
params?: Partial<ModifyGuildRolePositionParams>,
|
|
2903
3303
|
options?: O,
|
|
2904
|
-
) =>
|
|
2905
|
-
/** Modify a guild scheduled event. Returns the modified guild scheduled event object on success. */
|
|
3304
|
+
) => RestResponse<Role[]>
|
|
3305
|
+
/** Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event. */
|
|
2906
3306
|
modifyGuildScheduledEvent: (
|
|
2907
3307
|
guildId: string,
|
|
2908
3308
|
guildScheduledEventId: string,
|
|
2909
3309
|
params?: Partial<ModifyGuildScheduledEventParams>,
|
|
2910
3310
|
options?: O,
|
|
2911
|
-
) =>
|
|
2912
|
-
/** Modify the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated sticker object on success. */
|
|
3311
|
+
) => RestResponse<GuildScheduledEvent>
|
|
3312
|
+
/** Modify the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event. */
|
|
2913
3313
|
modifyGuildSticker: (
|
|
2914
3314
|
guildId: string,
|
|
2915
3315
|
stickerId: string,
|
|
2916
3316
|
params?: Partial<ModifyGuildStickerParams>,
|
|
2917
3317
|
options?: O,
|
|
2918
|
-
) =>
|
|
3318
|
+
) => RestResponse<Sticker>
|
|
2919
3319
|
/** Modifies the template's metadata. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
|
|
2920
3320
|
modifyGuildTemplate: (
|
|
2921
3321
|
guildId: string,
|
|
2922
3322
|
templateCode: string,
|
|
2923
3323
|
params?: Partial<ModifyGuildTemplateParams>,
|
|
2924
3324
|
options?: O,
|
|
2925
|
-
) =>
|
|
3325
|
+
) => RestResponse<GuildTemplate>
|
|
2926
3326
|
/** Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. */
|
|
2927
3327
|
modifyGuildWelcomeScreen: (
|
|
2928
3328
|
guildId: string,
|
|
2929
3329
|
params?: Partial<ModifyGuildWelcomeScreenParams>,
|
|
2930
3330
|
options?: O,
|
|
2931
|
-
) =>
|
|
3331
|
+
) => RestResponse<WelcomeScreen>
|
|
2932
3332
|
/** Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget object. */
|
|
2933
3333
|
modifyGuildWidget: (
|
|
2934
3334
|
guildId: string,
|
|
2935
3335
|
options?: O,
|
|
2936
|
-
) =>
|
|
2937
|
-
/** Updates fields of an existing Stage instance. Returns the updated Stage instance. */
|
|
3336
|
+
) => RestResponse<GuildWidgetSetting>
|
|
3337
|
+
/** Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event. */
|
|
2938
3338
|
modifyStageInstance: (
|
|
2939
3339
|
channelId: string,
|
|
2940
3340
|
params?: Partial<ModifyStageInstanceParams>,
|
|
2941
3341
|
options?: O,
|
|
2942
|
-
) =>
|
|
2943
|
-
/** Updates another user's voice state. */
|
|
3342
|
+
) => RestResponse<StageInstance>
|
|
3343
|
+
/** Updates another user's voice state. Fires a Voice State Update Gateway event. */
|
|
2944
3344
|
modifyUserVoiceState: (
|
|
2945
3345
|
guildId: string,
|
|
2946
3346
|
userId: string,
|
|
2947
3347
|
params?: Partial<ModifyUserVoiceStateParams>,
|
|
2948
3348
|
options?: O,
|
|
2949
|
-
) =>
|
|
2950
|
-
/** Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated webhook object on success. */
|
|
3349
|
+
) => RestResponse<any>
|
|
3350
|
+
/** Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated webhook object on success. Fires a Webhooks Update Gateway event. */
|
|
2951
3351
|
modifyWebhook: (
|
|
2952
3352
|
webhookId: string,
|
|
2953
3353
|
params?: Partial<ModifyWebhookParams>,
|
|
2954
3354
|
options?: O,
|
|
2955
|
-
) =>
|
|
3355
|
+
) => RestResponse<Webhook>
|
|
2956
3356
|
/** Same as above, except this call does not require authentication, does not accept a channel_id parameter in the body, and does not return a user in the webhook object. */
|
|
2957
3357
|
modifyWebhookWithToken: (
|
|
2958
3358
|
webhookId: string,
|
|
2959
3359
|
webhookToken: string,
|
|
2960
3360
|
options?: O,
|
|
2961
|
-
) =>
|
|
2962
|
-
/** Pin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. */
|
|
3361
|
+
) => RestResponse<any>
|
|
3362
|
+
/** Pin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event. */
|
|
2963
3363
|
pinMessage: (
|
|
2964
3364
|
channelId: string,
|
|
2965
3365
|
messageId: string,
|
|
2966
3366
|
options?: O,
|
|
2967
|
-
) =>
|
|
3367
|
+
) => RestResponse<any>
|
|
2968
3368
|
/** Remove the ban for a user. Requires the BAN_MEMBERS permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event. */
|
|
2969
3369
|
removeGuildBan: (
|
|
2970
3370
|
guildId: string,
|
|
2971
3371
|
userId: string,
|
|
2972
3372
|
options?: O,
|
|
2973
|
-
) =>
|
|
3373
|
+
) => RestResponse<any>
|
|
2974
3374
|
/** Remove a member from a guild. Requires KICK_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event. */
|
|
2975
3375
|
removeGuildMember: (
|
|
2976
3376
|
guildId: string,
|
|
2977
3377
|
userId: string,
|
|
2978
3378
|
options?: O,
|
|
2979
|
-
) =>
|
|
3379
|
+
) => RestResponse<any>
|
|
2980
3380
|
/** Removes a role from a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event. */
|
|
2981
3381
|
removeGuildMemberRole: (
|
|
2982
3382
|
guildId: string,
|
|
2983
3383
|
userId: string,
|
|
2984
3384
|
roleId: string,
|
|
2985
3385
|
options?: O,
|
|
2986
|
-
) =>
|
|
2987
|
-
/** Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a
|
|
3386
|
+
) => RestResponse<any>
|
|
3387
|
+
/** Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a PRIVATE_THREAD. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
|
|
2988
3388
|
removeThreadMember: (
|
|
2989
3389
|
channelId: string,
|
|
2990
3390
|
userId: string,
|
|
2991
3391
|
options?: O,
|
|
2992
|
-
) =>
|
|
3392
|
+
) => RestResponse<any>
|
|
2993
3393
|
/** Returns a list of guild member objects whose username or nickname starts with a provided string. */
|
|
2994
3394
|
searchGuildMembers: (
|
|
2995
3395
|
guildId: string,
|
|
2996
3396
|
params?: Partial<SearchGuildMemberParams>,
|
|
2997
3397
|
options?: O,
|
|
2998
|
-
) =>
|
|
3398
|
+
) => RestResponse<GuildMember[]>
|
|
2999
3399
|
/** Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
|
|
3000
|
-
|
|
3400
|
+
startThreadFromMessage: (
|
|
3001
3401
|
channelId: string,
|
|
3002
3402
|
messageId: string,
|
|
3003
|
-
params?: Partial<
|
|
3403
|
+
params?: Partial<StartThreadFromMessageParams>,
|
|
3404
|
+
options?: O,
|
|
3405
|
+
) => RestResponse<Channel>
|
|
3406
|
+
/** Creates a new thread in a forum channel, and sends a message within the created thread. Returns a channel, with a nested message object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and Message Create Gateway event. */
|
|
3407
|
+
startThreadInForumChannel: (
|
|
3408
|
+
channelId: string,
|
|
3409
|
+
params?: Partial<StartThreadInForumChannelParams>,
|
|
3004
3410
|
options?: O,
|
|
3005
|
-
) =>
|
|
3006
|
-
/** Creates a new thread that is not connected to an existing message.
|
|
3411
|
+
) => RestResponse<Channel>
|
|
3412
|
+
/** Creates a new thread that is not connected to an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event. */
|
|
3007
3413
|
startThreadWithoutMessage: (
|
|
3008
3414
|
channelId: string,
|
|
3009
3415
|
params?: Partial<StartThreadWithoutMessageParams>,
|
|
3010
3416
|
options?: O,
|
|
3011
|
-
) =>
|
|
3417
|
+
) => RestResponse<Channel>
|
|
3012
3418
|
/** Syncs the template to the guild's current state. Requires the MANAGE_GUILD permission. Returns the guild template object on success. */
|
|
3013
3419
|
syncGuildTemplate: (
|
|
3014
3420
|
guildId: string,
|
|
3015
3421
|
templateCode: string,
|
|
3016
3422
|
options?: O,
|
|
3017
|
-
) =>
|
|
3423
|
+
) => RestResponse<GuildTemplate>
|
|
3018
3424
|
/** Post a typing indicator for the specified channel. Generally bots should not implement this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message. Returns a 204 empty response on success. Fires a Typing Start Gateway event. */
|
|
3019
|
-
triggerTypingIndicator: (channelId: string, options?: O) =>
|
|
3020
|
-
/** Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. */
|
|
3425
|
+
triggerTypingIndicator: (channelId: string, options?: O) => RestResponse<any>
|
|
3426
|
+
/** Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event. */
|
|
3021
3427
|
unpinMessage: (
|
|
3022
3428
|
channelId: string,
|
|
3023
3429
|
messageId: string,
|
|
3024
3430
|
options?: O,
|
|
3025
|
-
) =>
|
|
3431
|
+
) => RestResponse<any>
|
|
3432
|
+
}
|
|
3433
|
+
export enum EventType {
|
|
3434
|
+
/** when a member sends or edits a message in the guild */
|
|
3435
|
+
MESSAGE_SEND = 1,
|
|
3026
3436
|
}
|
|
3027
3437
|
export interface ExecuteWebhookParams {
|
|
3028
3438
|
/** the message contents (up to 2000 characters) */
|
|
@@ -3047,6 +3457,8 @@ export interface ExecuteWebhookParams {
|
|
|
3047
3457
|
attachments: Attachment[]
|
|
3048
3458
|
/** message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
3049
3459
|
flags: number
|
|
3460
|
+
/** name of thread to create (requires the webhook channel to be a forum channel) */
|
|
3461
|
+
thread_name: string
|
|
3050
3462
|
}
|
|
3051
3463
|
export enum ExplicitContentFilterLevel {
|
|
3052
3464
|
/** media content will not be scanned */
|
|
@@ -3056,149 +3468,47 @@ export enum ExplicitContentFilterLevel {
|
|
|
3056
3468
|
/** media content sent by all members will be scanned */
|
|
3057
3469
|
ALL_MEMBERS = 2,
|
|
3058
3470
|
}
|
|
3471
|
+
export interface FollowAnnouncementChannelParams {
|
|
3472
|
+
/** id of target channel */
|
|
3473
|
+
webhook_channel_id: Snowflake
|
|
3474
|
+
}
|
|
3059
3475
|
export interface FollowedChannel {
|
|
3060
3476
|
/** source channel id */
|
|
3061
3477
|
channel_id: Snowflake
|
|
3062
3478
|
/** created target webhook id */
|
|
3063
3479
|
webhook_id: Snowflake
|
|
3064
3480
|
}
|
|
3065
|
-
export interface
|
|
3066
|
-
/** id of
|
|
3067
|
-
|
|
3481
|
+
export interface ForumTag {
|
|
3482
|
+
/** the id of the tag */
|
|
3483
|
+
id: Snowflake
|
|
3484
|
+
/** the name of the tag (0-20 characters) */
|
|
3485
|
+
name: string
|
|
3486
|
+
/** whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission */
|
|
3487
|
+
moderated: boolean
|
|
3488
|
+
/** the id of a guild's custom emoji * */
|
|
3489
|
+
emoji_id: Snowflake
|
|
3490
|
+
/** the unicode character of the emoji * */
|
|
3491
|
+
emoji_name?: string | null
|
|
3068
3492
|
}
|
|
3069
|
-
export
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
| ReconnectEvent
|
|
3089
|
-
| InvalidSessionEvent
|
|
3090
|
-
| ChannelCreateEvent
|
|
3091
|
-
| ChannelUpdateEvent
|
|
3092
|
-
| ChannelDeleteEvent
|
|
3093
|
-
| ChannelPinsUpdateEvent
|
|
3094
|
-
| ThreadCreateEvent
|
|
3095
|
-
| ThreadUpdateEvent
|
|
3096
|
-
| ThreadDeleteEvent
|
|
3097
|
-
| ThreadListSyncEvent
|
|
3098
|
-
| ThreadMemberUpdateEvent
|
|
3099
|
-
| ThreadMembersUpdateEvent
|
|
3100
|
-
| GuildCreateEvent
|
|
3101
|
-
| GuildUpdateEvent
|
|
3102
|
-
| GuildDeleteEvent
|
|
3103
|
-
| GuildBanAddEvent
|
|
3104
|
-
| GuildBanRemoveEvent
|
|
3105
|
-
| GuildEmojisUpdateEvent
|
|
3106
|
-
| GuildStickersUpdateEvent
|
|
3107
|
-
| GuildIntegrationsUpdateEvent
|
|
3108
|
-
| GuildMemberAddEvent
|
|
3109
|
-
| GuildMemberRemoveEvent
|
|
3110
|
-
| GuildMemberUpdateEvent
|
|
3111
|
-
| GuildMembersChunkEvent
|
|
3112
|
-
| GuildRoleCreateEvent
|
|
3113
|
-
| GuildRoleUpdateEvent
|
|
3114
|
-
| GuildRoleDeleteEvent
|
|
3115
|
-
| GuildScheduledEventCreateEvent
|
|
3116
|
-
| GuildScheduledEventUpdateEvent
|
|
3117
|
-
| GuildScheduledEventDeleteEvent
|
|
3118
|
-
| GuildScheduledEventUserAddEvent
|
|
3119
|
-
| GuildScheduledEventUserRemoveEvent
|
|
3120
|
-
| IntegrationCreateEvent
|
|
3121
|
-
| IntegrationUpdateEvent
|
|
3122
|
-
| IntegrationDeleteEvent
|
|
3123
|
-
| InteractionCreateEvent
|
|
3124
|
-
| InviteCreateEvent
|
|
3125
|
-
| InviteDeleteEvent
|
|
3126
|
-
| MessageCreateEvent
|
|
3127
|
-
| MessageUpdateEvent
|
|
3128
|
-
| MessageDeleteEvent
|
|
3129
|
-
| MessageDeleteBulkEvent
|
|
3130
|
-
| MessageReactionAddEvent
|
|
3131
|
-
| MessageReactionRemoveEvent
|
|
3132
|
-
| MessageReactionRemoveAllEvent
|
|
3133
|
-
| MessageReactionRemoveEmojiEvent
|
|
3134
|
-
| PresenceUpdateEvent
|
|
3135
|
-
| StageInstanceCreateEvent
|
|
3136
|
-
| StageInstanceDeleteEvent
|
|
3137
|
-
| StageInstanceUpdateEvent
|
|
3138
|
-
| TypingStartEvent
|
|
3139
|
-
| UserUpdateEvent
|
|
3140
|
-
| VoiceStateUpdateEvent
|
|
3141
|
-
| VoiceServerUpdateEvent
|
|
3142
|
-
| WebhooksUpdateEvent
|
|
3143
|
-
export interface GatewayEvents {
|
|
3144
|
-
HELLO: HelloEvent
|
|
3145
|
-
READY: ReadyEvent
|
|
3146
|
-
RESUMED: ResumedEvent
|
|
3147
|
-
RECONNECT: ReconnectEvent
|
|
3148
|
-
INVALID_SESSION: InvalidSessionEvent
|
|
3149
|
-
CHANNEL_CREATE: ChannelCreateEvent
|
|
3150
|
-
CHANNEL_UPDATE: ChannelUpdateEvent
|
|
3151
|
-
CHANNEL_DELETE: ChannelDeleteEvent
|
|
3152
|
-
CHANNEL_PINS_UPDATE: ChannelPinsUpdateEvent
|
|
3153
|
-
THREAD_CREATE: ThreadCreateEvent
|
|
3154
|
-
THREAD_UPDATE: ThreadUpdateEvent
|
|
3155
|
-
THREAD_DELETE: ThreadDeleteEvent
|
|
3156
|
-
THREAD_LIST_SYNC: ThreadListSyncEvent
|
|
3157
|
-
THREAD_MEMBER_UPDATE: ThreadMemberUpdateEvent
|
|
3158
|
-
THREAD_MEMBERS_UPDATE: ThreadMembersUpdateEvent
|
|
3159
|
-
GUILD_CREATE: GuildCreateEvent
|
|
3160
|
-
GUILD_UPDATE: GuildUpdateEvent
|
|
3161
|
-
GUILD_DELETE: GuildDeleteEvent
|
|
3162
|
-
GUILD_BAN_ADD: GuildBanAddEvent
|
|
3163
|
-
GUILD_BAN_REMOVE: GuildBanRemoveEvent
|
|
3164
|
-
GUILD_EMOJIS_UPDATE: GuildEmojisUpdateEvent
|
|
3165
|
-
GUILD_STICKERS_UPDATE: GuildStickersUpdateEvent
|
|
3166
|
-
GUILD_INTEGRATIONS_UPDATE: GuildIntegrationsUpdateEvent
|
|
3167
|
-
GUILD_MEMBER_ADD: GuildMemberAddEvent
|
|
3168
|
-
GUILD_MEMBER_REMOVE: GuildMemberRemoveEvent
|
|
3169
|
-
GUILD_MEMBER_UPDATE: GuildMemberUpdateEvent
|
|
3170
|
-
GUILD_MEMBERS_CHUNK: GuildMembersChunkEvent
|
|
3171
|
-
GUILD_ROLE_CREATE: GuildRoleCreateEvent
|
|
3172
|
-
GUILD_ROLE_UPDATE: GuildRoleUpdateEvent
|
|
3173
|
-
GUILD_ROLE_DELETE: GuildRoleDeleteEvent
|
|
3174
|
-
GUILD_SCHEDULED_EVENT_CREATE: GuildScheduledEventCreateEvent
|
|
3175
|
-
GUILD_SCHEDULED_EVENT_UPDATE: GuildScheduledEventUpdateEvent
|
|
3176
|
-
GUILD_SCHEDULED_EVENT_DELETE: GuildScheduledEventDeleteEvent
|
|
3177
|
-
GUILD_SCHEDULED_EVENT_USER_ADD: GuildScheduledEventUserAddEvent
|
|
3178
|
-
GUILD_SCHEDULED_EVENT_USER_REMOVE: GuildScheduledEventUserRemoveEvent
|
|
3179
|
-
INTEGRATION_CREATE: IntegrationCreateEvent
|
|
3180
|
-
INTEGRATION_UPDATE: IntegrationUpdateEvent
|
|
3181
|
-
INTEGRATION_DELETE: IntegrationDeleteEvent
|
|
3182
|
-
INTERACTION_CREATE: InteractionCreateEvent
|
|
3183
|
-
INVITE_CREATE: InviteCreateEvent
|
|
3184
|
-
INVITE_DELETE: InviteDeleteEvent
|
|
3185
|
-
MESSAGE_CREATE: MessageCreateEvent
|
|
3186
|
-
MESSAGE_UPDATE: MessageUpdateEvent
|
|
3187
|
-
MESSAGE_DELETE: MessageDeleteEvent
|
|
3188
|
-
MESSAGE_DELETE_BULK: MessageDeleteBulkEvent
|
|
3189
|
-
MESSAGE_REACTION_ADD: MessageReactionAddEvent
|
|
3190
|
-
MESSAGE_REACTION_REMOVE: MessageReactionRemoveEvent
|
|
3191
|
-
MESSAGE_REACTION_REMOVE_ALL: MessageReactionRemoveAllEvent
|
|
3192
|
-
MESSAGE_REACTION_REMOVE_EMOJI: MessageReactionRemoveEmojiEvent
|
|
3193
|
-
PRESENCE_UPDATE: PresenceUpdateEvent
|
|
3194
|
-
STAGE_INSTANCE_CREATE: StageInstanceCreateEvent
|
|
3195
|
-
STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent
|
|
3196
|
-
STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent
|
|
3197
|
-
TYPING_START: TypingStartEvent
|
|
3198
|
-
USER_UPDATE: UserUpdateEvent
|
|
3199
|
-
VOICE_STATE_UPDATE: VoiceStateUpdateEvent
|
|
3200
|
-
VOICE_SERVER_UPDATE: VoiceServerUpdateEvent
|
|
3201
|
-
WEBHOOKS_UPDATE: WebhooksUpdateEvent
|
|
3493
|
+
export interface ForumThreadMessageParam {
|
|
3494
|
+
/** Message contents (up to 2000 characters) */
|
|
3495
|
+
content?: string
|
|
3496
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
3497
|
+
embeds?: Embed[]
|
|
3498
|
+
/** Allowed mentions for the message */
|
|
3499
|
+
allowed_mentions?: AllowedMention
|
|
3500
|
+
/** Components to include with the message */
|
|
3501
|
+
components?: Component[]
|
|
3502
|
+
/** IDs of up to 3 stickers in the server to send in the message */
|
|
3503
|
+
sticker_ids?: Snowflake[]
|
|
3504
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
3505
|
+
files: string
|
|
3506
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
3507
|
+
payload_json?: string
|
|
3508
|
+
/** Attachment objects with filename and description. See Uploading Files */
|
|
3509
|
+
attachments?: Attachment[]
|
|
3510
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
3511
|
+
flags?: number
|
|
3202
3512
|
}
|
|
3203
3513
|
export const GatewayIntents = {
|
|
3204
3514
|
GUILDS: 1 << 0,
|
|
@@ -3216,7 +3526,10 @@ export const GatewayIntents = {
|
|
|
3216
3526
|
DIRECT_MESSAGES: 1 << 12,
|
|
3217
3527
|
DIRECT_MESSAGE_REACTIONS: 1 << 13,
|
|
3218
3528
|
DIRECT_MESSAGE_TYPING: 1 << 14,
|
|
3529
|
+
MESSAGE_CONTENT: 1 << 15,
|
|
3219
3530
|
GUILD_SCHEDULED_EVENTS: 1 << 16,
|
|
3531
|
+
AUTO_MODERATION_CONFIGURATION: 1 << 20,
|
|
3532
|
+
AUTO_MODERATION_EXECUTION: 1 << 21,
|
|
3220
3533
|
} as const
|
|
3221
3534
|
export enum GatewayOpcode {
|
|
3222
3535
|
/** An event was dispatched. */
|
|
@@ -3252,15 +3565,33 @@ export interface GatewayPayload<T = any | null> {
|
|
|
3252
3565
|
/** the event name for this payload */
|
|
3253
3566
|
t?: string | null
|
|
3254
3567
|
}
|
|
3568
|
+
export interface GatewayUrlQueryStringParam {
|
|
3569
|
+
/** API Version to use */
|
|
3570
|
+
v: number
|
|
3571
|
+
/** The encoding of received gateway packets */
|
|
3572
|
+
encoding: string
|
|
3573
|
+
/** The optional transport compression of gateway packets */
|
|
3574
|
+
compress?: string
|
|
3575
|
+
}
|
|
3255
3576
|
export interface GetChannelMessageParams {
|
|
3256
|
-
/**
|
|
3257
|
-
around
|
|
3258
|
-
/**
|
|
3259
|
-
before
|
|
3260
|
-
/**
|
|
3261
|
-
after
|
|
3262
|
-
/**
|
|
3263
|
-
limit
|
|
3577
|
+
/** Get messages around this message ID */
|
|
3578
|
+
around?: Snowflake
|
|
3579
|
+
/** Get messages before this message ID */
|
|
3580
|
+
before?: Snowflake
|
|
3581
|
+
/** Get messages after this message ID */
|
|
3582
|
+
after?: Snowflake
|
|
3583
|
+
/** Max number of messages to return (1-100) */
|
|
3584
|
+
limit?: number
|
|
3585
|
+
}
|
|
3586
|
+
export interface GetCurrentAuthorizationInformationResponse {
|
|
3587
|
+
/** the current application */
|
|
3588
|
+
application: Application
|
|
3589
|
+
/** the scopes the user has authorized the application for */
|
|
3590
|
+
scopes: string[]
|
|
3591
|
+
/** when the access token expires */
|
|
3592
|
+
expires: string
|
|
3593
|
+
/** the user who has authorized, if the user has authorized with the identify scope */
|
|
3594
|
+
user?: User
|
|
3264
3595
|
}
|
|
3265
3596
|
export interface GetCurrentUserGuildParams {
|
|
3266
3597
|
/** get guilds before this guild ID */
|
|
@@ -3271,22 +3602,38 @@ export interface GetCurrentUserGuildParams {
|
|
|
3271
3602
|
limit: number
|
|
3272
3603
|
}
|
|
3273
3604
|
export interface GetGatewayBotResponse {
|
|
3274
|
-
/**
|
|
3605
|
+
/** WSS URL that can be used for connecting to the Gateway */
|
|
3275
3606
|
url: string
|
|
3276
|
-
/**
|
|
3607
|
+
/** Recommended number of shards to use when connecting */
|
|
3277
3608
|
shards: number
|
|
3278
3609
|
/** Information on the current session start limit */
|
|
3279
3610
|
session_start_limit: SessionStartLimit
|
|
3280
3611
|
}
|
|
3612
|
+
export interface GetGlobalApplicationCommandParams {
|
|
3613
|
+
/** Whether to include full localization dictionaries (name_localizations and description_localizations) in the returned objects, instead of the name_localized and description_localized fields. Default false. */
|
|
3614
|
+
with_localizations?: boolean
|
|
3615
|
+
}
|
|
3616
|
+
export interface GetGuildApplicationCommandParams {
|
|
3617
|
+
/** Whether to include full localization dictionaries (name_localizations and description_localizations) in the returned objects, instead of the name_localized and description_localized fields. Default false. */
|
|
3618
|
+
with_localizations?: boolean
|
|
3619
|
+
}
|
|
3281
3620
|
export interface GetGuildAuditLogParams {
|
|
3282
|
-
/**
|
|
3283
|
-
user_id
|
|
3284
|
-
/**
|
|
3285
|
-
action_type
|
|
3286
|
-
/**
|
|
3287
|
-
before
|
|
3288
|
-
/**
|
|
3289
|
-
limit
|
|
3621
|
+
/** Entries from a specific user ID */
|
|
3622
|
+
user_id?: Snowflake
|
|
3623
|
+
/** Entries for a specific audit log event */
|
|
3624
|
+
action_type?: AuditLogEvent
|
|
3625
|
+
/** Entries that preceded a specific audit log entry ID */
|
|
3626
|
+
before?: Snowflake
|
|
3627
|
+
/** Maximum number of entries (between 1-100) to return, defaults to 50 */
|
|
3628
|
+
limit?: number
|
|
3629
|
+
}
|
|
3630
|
+
export interface GetGuildBanParams {
|
|
3631
|
+
/** number of users to return (up to maximum 1000) */
|
|
3632
|
+
limit?: Number
|
|
3633
|
+
/** consider only users before given user id */
|
|
3634
|
+
before?: Snowflake
|
|
3635
|
+
/** consider only users after given user id */
|
|
3636
|
+
after?: Snowflake
|
|
3290
3637
|
}
|
|
3291
3638
|
export interface GetGuildParams {
|
|
3292
3639
|
/** when true, will return approximate member and presence counts for the guild */
|
|
@@ -3312,20 +3659,6 @@ export interface GetGuildScheduledEventUserParams {
|
|
|
3312
3659
|
/** consider only users after given user id */
|
|
3313
3660
|
after?: Snowflake
|
|
3314
3661
|
}
|
|
3315
|
-
export interface GetGuildWidget {
|
|
3316
|
-
/** guild id */
|
|
3317
|
-
id: Snowflake
|
|
3318
|
-
/** guild name (2-100 characters) */
|
|
3319
|
-
name: string
|
|
3320
|
-
/** instant invite for the guilds specified widget invite channel */
|
|
3321
|
-
instant_invite?: string | null
|
|
3322
|
-
/** voice and stage channels which are accessible by @everyone */
|
|
3323
|
-
channels: Channel[]
|
|
3324
|
-
/** special widget user objects that includes users presence (Limit 100) */
|
|
3325
|
-
members: User[]
|
|
3326
|
-
/** number of online members in this guild */
|
|
3327
|
-
presence_count: number
|
|
3328
|
-
}
|
|
3329
3662
|
export interface GetGuildWidgetImageParams {
|
|
3330
3663
|
/** style of the widget image returned (see below) */
|
|
3331
3664
|
style: string
|
|
@@ -3339,10 +3672,10 @@ export interface GetInviteParams {
|
|
|
3339
3672
|
guild_scheduled_event_id?: Snowflake
|
|
3340
3673
|
}
|
|
3341
3674
|
export interface GetReactionParams {
|
|
3342
|
-
/**
|
|
3343
|
-
after
|
|
3344
|
-
/**
|
|
3345
|
-
limit
|
|
3675
|
+
/** Get users after this user ID */
|
|
3676
|
+
after?: Snowflake
|
|
3677
|
+
/** Max number of users to return (1-100) */
|
|
3678
|
+
limit?: number
|
|
3346
3679
|
}
|
|
3347
3680
|
export interface GetWebhookMessageParams {
|
|
3348
3681
|
/** id of the thread the message is in */
|
|
@@ -3377,7 +3710,7 @@ export interface Guild {
|
|
|
3377
3710
|
region?: string | null
|
|
3378
3711
|
/** id of afk channel */
|
|
3379
3712
|
afk_channel_id?: Snowflake | null
|
|
3380
|
-
/** afk timeout in seconds */
|
|
3713
|
+
/** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
|
|
3381
3714
|
afk_timeout: number
|
|
3382
3715
|
/** true if the server widget is enabled */
|
|
3383
3716
|
widget_enabled?: boolean
|
|
@@ -3405,31 +3738,13 @@ export interface Guild {
|
|
|
3405
3738
|
system_channel_flags: number
|
|
3406
3739
|
/** the id of the channel where Community guilds can display rules and/or guidelines */
|
|
3407
3740
|
rules_channel_id?: Snowflake | null
|
|
3408
|
-
/** when this guild was joined at */
|
|
3409
|
-
joined_at?: string
|
|
3410
|
-
/** true if this is considered a large guild */
|
|
3411
|
-
large?: boolean
|
|
3412
|
-
/** true if this guild is unavailable due to an outage */
|
|
3413
|
-
unavailable?: boolean
|
|
3414
|
-
/** total number of members in this guild */
|
|
3415
|
-
member_count?: number
|
|
3416
|
-
/** states of members currently in voice channels; lacks the guild_id key */
|
|
3417
|
-
voice_states?: VoiceState[]
|
|
3418
|
-
/** users in the guild */
|
|
3419
|
-
members?: GuildMember[]
|
|
3420
|
-
/** channels in the guild */
|
|
3421
|
-
channels?: Channel[]
|
|
3422
|
-
/** all active threads in the guild that current user has permission to view */
|
|
3423
|
-
threads?: Channel[]
|
|
3424
|
-
/** presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
|
|
3425
|
-
presences?: PresenceUpdateEvent[]
|
|
3426
3741
|
/** the maximum number of presences for the guild (null is always returned, apart from the largest of guilds) */
|
|
3427
3742
|
max_presences?: number | null
|
|
3428
3743
|
/** the maximum number of members for the guild */
|
|
3429
3744
|
max_members?: number
|
|
3430
3745
|
/** the vanity url code for the guild */
|
|
3431
3746
|
vanity_url_code?: string | null
|
|
3432
|
-
/** the description of a
|
|
3747
|
+
/** the description of a guild */
|
|
3433
3748
|
description?: string | null
|
|
3434
3749
|
/** banner hash */
|
|
3435
3750
|
banner?: string | null
|
|
@@ -3451,58 +3766,86 @@ export interface Guild {
|
|
|
3451
3766
|
welcome_screen?: WelcomeScreen
|
|
3452
3767
|
/** guild NSFW level */
|
|
3453
3768
|
nsfw_level: GuildNsfwLevel
|
|
3454
|
-
/** Stage instances in the guild */
|
|
3455
|
-
stage_instances?: StageInstance[]
|
|
3456
3769
|
/** custom guild stickers */
|
|
3457
3770
|
stickers?: Sticker[]
|
|
3458
|
-
/** the scheduled events in the guild */
|
|
3459
|
-
guild_scheduled_events?: GuildScheduledEvent[]
|
|
3460
3771
|
/** whether the guild has the boost progress bar enabled */
|
|
3461
3772
|
premium_progress_bar_enabled: boolean
|
|
3462
3773
|
}
|
|
3463
3774
|
export interface GuildApplicationCommandPermission {
|
|
3464
|
-
/**
|
|
3775
|
+
/** ID of the command or the application ID */
|
|
3465
3776
|
id: Snowflake
|
|
3466
|
-
/**
|
|
3777
|
+
/** ID of the application the command belongs to */
|
|
3467
3778
|
application_id: Snowflake
|
|
3468
|
-
/**
|
|
3779
|
+
/** ID of the guild */
|
|
3469
3780
|
guild_id: Snowflake
|
|
3470
|
-
/**
|
|
3781
|
+
/** Permissions for the command in the guild, max of 100 */
|
|
3471
3782
|
permissions: ApplicationCommandPermission[]
|
|
3472
3783
|
}
|
|
3473
3784
|
export interface GuildBanAddEvent {
|
|
3474
|
-
/**
|
|
3785
|
+
/** ID of the guild */
|
|
3475
3786
|
guild_id: Snowflake
|
|
3476
|
-
/**
|
|
3787
|
+
/** User who was banned */
|
|
3477
3788
|
user: User
|
|
3478
3789
|
}
|
|
3479
3790
|
export interface GuildBanRemoveEvent {
|
|
3480
|
-
/**
|
|
3791
|
+
/** ID of the guild */
|
|
3481
3792
|
guild_id: Snowflake
|
|
3482
|
-
/**
|
|
3793
|
+
/** User who was unbanned */
|
|
3483
3794
|
user: User
|
|
3484
3795
|
}
|
|
3485
|
-
export type GuildCreateEvent = Guild
|
|
3796
|
+
export type GuildCreateEvent = Guild & GuildCreateExtra
|
|
3797
|
+
export interface GuildCreateExtra {
|
|
3798
|
+
/** When this guild was joined at */
|
|
3799
|
+
joined_at: string
|
|
3800
|
+
/** true if this is considered a large guild */
|
|
3801
|
+
large: boolean
|
|
3802
|
+
/** true if this guild is unavailable due to an outage */
|
|
3803
|
+
unavailable?: boolean
|
|
3804
|
+
/** Total number of members in this guild */
|
|
3805
|
+
member_count: number
|
|
3806
|
+
/** States of members currently in voice channels; lacks the guild_id key */
|
|
3807
|
+
voice_states: VoiceState[]
|
|
3808
|
+
/** Users in the guild */
|
|
3809
|
+
members: GuildMember[]
|
|
3810
|
+
/** Channels in the guild */
|
|
3811
|
+
channels: Channel[]
|
|
3812
|
+
/** All active threads in the guild that current user has permission to view */
|
|
3813
|
+
threads: Channel[]
|
|
3814
|
+
/** Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold */
|
|
3815
|
+
presences: PresenceUpdateEvent[]
|
|
3816
|
+
/** Stage instances in the guild */
|
|
3817
|
+
stage_instances: StageInstance[]
|
|
3818
|
+
/** Scheduled events in the guild */
|
|
3819
|
+
guild_scheduled_events: GuildScheduledEvent[]
|
|
3820
|
+
}
|
|
3486
3821
|
export type GuildDeleteEvent = UnavailableGuild
|
|
3487
3822
|
export interface GuildEmojisUpdateEvent {
|
|
3488
|
-
/**
|
|
3823
|
+
/** ID of the guild */
|
|
3489
3824
|
guild_id: Snowflake
|
|
3490
|
-
/**
|
|
3825
|
+
/** Array of emojis */
|
|
3491
3826
|
emojis: Emoji[]
|
|
3492
3827
|
}
|
|
3493
3828
|
export enum GuildFeature {
|
|
3829
|
+
/** guild has access to set an animated guild banner image */
|
|
3830
|
+
ANIMATED_BANNER = "ANIMATED_BANNER",
|
|
3494
3831
|
/** guild has access to set an animated guild icon */
|
|
3495
3832
|
ANIMATED_ICON = "ANIMATED_ICON",
|
|
3833
|
+
/** guild is using the old permissions configuration behavior */
|
|
3834
|
+
APPLICATION_COMMAND_PERMISSIONS_V2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
|
|
3835
|
+
/** guild has set up auto moderation rules */
|
|
3836
|
+
AUTO_MODERATION = "AUTO_MODERATION",
|
|
3496
3837
|
/** guild has access to set a guild banner image */
|
|
3497
3838
|
BANNER = "BANNER",
|
|
3498
|
-
/** guild has access to use commerce features (i.e. create store channels) */
|
|
3499
|
-
COMMERCE = "COMMERCE",
|
|
3500
3839
|
/** guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates */
|
|
3501
3840
|
COMMUNITY = "COMMUNITY",
|
|
3841
|
+
/** guild has been set as a support server on the App Directory */
|
|
3842
|
+
DEVELOPER_SUPPORT_SERVER = "DEVELOPER_SUPPORT_SERVER",
|
|
3502
3843
|
/** guild is able to be discovered in the directory */
|
|
3503
3844
|
DISCOVERABLE = "DISCOVERABLE",
|
|
3504
3845
|
/** guild is able to be featured in the directory */
|
|
3505
3846
|
FEATURABLE = "FEATURABLE",
|
|
3847
|
+
/** guild has paused invites, preventing new users from joining */
|
|
3848
|
+
INVITES_DISABLED = "INVITES_DISABLED",
|
|
3506
3849
|
/** guild has access to set an invite splash background */
|
|
3507
3850
|
INVITE_SPLASH = "INVITE_SPLASH",
|
|
3508
3851
|
/** guild has enabled Membership Screening */
|
|
@@ -3511,20 +3854,14 @@ export enum GuildFeature {
|
|
|
3511
3854
|
MONETIZATION_ENABLED = "MONETIZATION_ENABLED",
|
|
3512
3855
|
/** guild has increased custom sticker slots */
|
|
3513
3856
|
MORE_STICKERS = "MORE_STICKERS",
|
|
3514
|
-
/** guild has access to create
|
|
3857
|
+
/** guild has access to create announcement channels */
|
|
3515
3858
|
NEWS = "NEWS",
|
|
3516
3859
|
/** guild is partnered */
|
|
3517
3860
|
PARTNERED = "PARTNERED",
|
|
3518
3861
|
/** guild can be previewed before joining via Membership Screening or the directory */
|
|
3519
3862
|
PREVIEW_ENABLED = "PREVIEW_ENABLED",
|
|
3520
|
-
/** guild has access to create private threads */
|
|
3521
|
-
PRIVATE_THREADS = "PRIVATE_THREADS",
|
|
3522
3863
|
/** guild is able to set role icons */
|
|
3523
3864
|
ROLE_ICONS = "ROLE_ICONS",
|
|
3524
|
-
/** guild has access to the seven day archive time for threads */
|
|
3525
|
-
SEVEN_DAY_THREAD_ARCHIVE = "SEVEN_DAY_THREAD_ARCHIVE",
|
|
3526
|
-
/** guild has access to the three day archive time for threads */
|
|
3527
|
-
THREE_DAY_THREAD_ARCHIVE = "THREE_DAY_THREAD_ARCHIVE",
|
|
3528
3865
|
/** guild has enabled ticketed events */
|
|
3529
3866
|
TICKETED_EVENTS_ENABLED = "TICKETED_EVENTS_ENABLED",
|
|
3530
3867
|
/** guild has access to set a vanity URL */
|
|
@@ -3537,7 +3874,7 @@ export enum GuildFeature {
|
|
|
3537
3874
|
WELCOME_SCREEN_ENABLED = "WELCOME_SCREEN_ENABLED",
|
|
3538
3875
|
}
|
|
3539
3876
|
export interface GuildIntegrationsUpdateEvent {
|
|
3540
|
-
/**
|
|
3877
|
+
/** ID of the guild whose integrations were updated */
|
|
3541
3878
|
guild_id: Snowflake
|
|
3542
3879
|
}
|
|
3543
3880
|
export interface GuildMember {
|
|
@@ -3566,53 +3903,53 @@ export interface GuildMember {
|
|
|
3566
3903
|
}
|
|
3567
3904
|
export type GuildMemberAddEvent = GuildMember & GuildMemberAddExtra
|
|
3568
3905
|
export interface GuildMemberAddExtra {
|
|
3569
|
-
/**
|
|
3906
|
+
/** ID of the guild */
|
|
3570
3907
|
guild_id: Snowflake
|
|
3571
3908
|
}
|
|
3572
3909
|
export interface GuildMemberRemoveEvent {
|
|
3573
|
-
/**
|
|
3910
|
+
/** ID of the guild */
|
|
3574
3911
|
guild_id: Snowflake
|
|
3575
|
-
/**
|
|
3912
|
+
/** User who was removed */
|
|
3576
3913
|
user: User
|
|
3577
3914
|
}
|
|
3578
3915
|
export interface GuildMembersChunkEvent {
|
|
3579
|
-
/**
|
|
3916
|
+
/** ID of the guild */
|
|
3580
3917
|
guild_id: Snowflake
|
|
3581
|
-
/**
|
|
3918
|
+
/** Set of guild members */
|
|
3582
3919
|
members: GuildMember[]
|
|
3583
|
-
/**
|
|
3920
|
+
/** Chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count) */
|
|
3584
3921
|
chunk_index: number
|
|
3585
|
-
/**
|
|
3922
|
+
/** Total number of expected chunks for this response */
|
|
3586
3923
|
chunk_count: number
|
|
3587
|
-
/**
|
|
3924
|
+
/** When passing an invalid ID to REQUEST_GUILD_MEMBERS, it will be returned here */
|
|
3588
3925
|
not_found?: any[]
|
|
3589
|
-
/**
|
|
3926
|
+
/** When passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here */
|
|
3590
3927
|
presences?: PresenceUpdateEvent[]
|
|
3591
|
-
/**
|
|
3928
|
+
/** Nonce used in the Guild Members Request */
|
|
3592
3929
|
nonce?: string
|
|
3593
3930
|
}
|
|
3594
3931
|
export interface GuildMemberUpdateEvent {
|
|
3595
|
-
/**
|
|
3932
|
+
/** ID of the guild */
|
|
3596
3933
|
guild_id: Snowflake
|
|
3597
|
-
/**
|
|
3934
|
+
/** User role ids */
|
|
3598
3935
|
roles: Snowflake[]
|
|
3599
|
-
/**
|
|
3936
|
+
/** User */
|
|
3600
3937
|
user: User
|
|
3601
|
-
/**
|
|
3938
|
+
/** Nickname of the user in the guild */
|
|
3602
3939
|
nick?: string | null
|
|
3603
|
-
/**
|
|
3940
|
+
/** Member's guild avatar hash */
|
|
3604
3941
|
avatar?: string | null
|
|
3605
|
-
/**
|
|
3942
|
+
/** When the user joined the guild */
|
|
3606
3943
|
joined_at?: string | null
|
|
3607
|
-
/**
|
|
3944
|
+
/** When the user starting boosting the guild */
|
|
3608
3945
|
premium_since?: string | null
|
|
3609
|
-
/**
|
|
3946
|
+
/** Whether the user is deafened in voice channels */
|
|
3610
3947
|
deaf?: boolean
|
|
3611
|
-
/**
|
|
3948
|
+
/** Whether the user is muted in voice channels */
|
|
3612
3949
|
mute?: boolean
|
|
3613
|
-
/**
|
|
3950
|
+
/** Whether the user has not yet passed the guild's Membership Screening requirements */
|
|
3614
3951
|
pending?: boolean
|
|
3615
|
-
/**
|
|
3952
|
+
/** When the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
|
|
3616
3953
|
communication_disabled_until?: string | null
|
|
3617
3954
|
}
|
|
3618
3955
|
export enum GuildNsfwLevel {
|
|
@@ -3640,27 +3977,27 @@ export interface GuildPreview {
|
|
|
3640
3977
|
approximate_member_count: number
|
|
3641
3978
|
/** approximate number of online members in this guild */
|
|
3642
3979
|
approximate_presence_count: number
|
|
3643
|
-
/** the description for the guild
|
|
3980
|
+
/** the description for the guild */
|
|
3644
3981
|
description?: string | null
|
|
3645
3982
|
/** custom guild stickers */
|
|
3646
3983
|
stickers: Sticker[]
|
|
3647
3984
|
}
|
|
3648
3985
|
export interface GuildRoleCreateEvent {
|
|
3649
|
-
/**
|
|
3986
|
+
/** ID of the guild */
|
|
3650
3987
|
guild_id: Snowflake
|
|
3651
|
-
/**
|
|
3988
|
+
/** Role that was created */
|
|
3652
3989
|
role: Role
|
|
3653
3990
|
}
|
|
3654
3991
|
export interface GuildRoleDeleteEvent {
|
|
3655
|
-
/**
|
|
3992
|
+
/** ID of the guild */
|
|
3656
3993
|
guild_id: Snowflake
|
|
3657
|
-
/**
|
|
3994
|
+
/** ID of the role */
|
|
3658
3995
|
role_id: Snowflake
|
|
3659
3996
|
}
|
|
3660
3997
|
export interface GuildRoleUpdateEvent {
|
|
3661
|
-
/**
|
|
3998
|
+
/** ID of the guild */
|
|
3662
3999
|
guild_id: Snowflake
|
|
3663
|
-
/**
|
|
4000
|
+
/** Role that was updated */
|
|
3664
4001
|
role: Role
|
|
3665
4002
|
}
|
|
3666
4003
|
export interface GuildScheduledEvent {
|
|
@@ -3728,25 +4065,25 @@ export interface GuildScheduledEventUser {
|
|
|
3728
4065
|
member?: GuildMember
|
|
3729
4066
|
}
|
|
3730
4067
|
export interface GuildScheduledEventUserAddEvent {
|
|
3731
|
-
/**
|
|
4068
|
+
/** ID of the guild scheduled event */
|
|
3732
4069
|
guild_scheduled_event_id: Snowflake
|
|
3733
|
-
/**
|
|
4070
|
+
/** ID of the user */
|
|
3734
4071
|
user_id: Snowflake
|
|
3735
|
-
/**
|
|
4072
|
+
/** ID of the guild */
|
|
3736
4073
|
guild_id: Snowflake
|
|
3737
4074
|
}
|
|
3738
4075
|
export interface GuildScheduledEventUserRemoveEvent {
|
|
3739
|
-
/**
|
|
4076
|
+
/** ID of the guild scheduled event */
|
|
3740
4077
|
guild_scheduled_event_id: Snowflake
|
|
3741
|
-
/**
|
|
4078
|
+
/** ID of the user */
|
|
3742
4079
|
user_id: Snowflake
|
|
3743
|
-
/**
|
|
4080
|
+
/** ID of the guild */
|
|
3744
4081
|
guild_id: Snowflake
|
|
3745
4082
|
}
|
|
3746
4083
|
export interface GuildStickersUpdateEvent {
|
|
3747
|
-
/**
|
|
4084
|
+
/** ID of the guild */
|
|
3748
4085
|
guild_id: Snowflake
|
|
3749
|
-
/**
|
|
4086
|
+
/** Array of stickers */
|
|
3750
4087
|
stickers: Sticker[]
|
|
3751
4088
|
}
|
|
3752
4089
|
export interface GuildTemplate {
|
|
@@ -3774,6 +4111,20 @@ export interface GuildTemplate {
|
|
|
3774
4111
|
is_dirty?: boolean | null
|
|
3775
4112
|
}
|
|
3776
4113
|
export type GuildUpdateEvent = Guild
|
|
4114
|
+
export interface GuildWidget {
|
|
4115
|
+
/** guild id */
|
|
4116
|
+
id: Snowflake
|
|
4117
|
+
/** guild name (2-100 characters) */
|
|
4118
|
+
name: string
|
|
4119
|
+
/** instant invite for the guilds specified widget invite channel */
|
|
4120
|
+
instant_invite?: string | null
|
|
4121
|
+
/** voice and stage channels which are accessible by @everyone */
|
|
4122
|
+
channels: Channel[]
|
|
4123
|
+
/** special widget user objects that includes users presence (Limit 100) */
|
|
4124
|
+
members: User[]
|
|
4125
|
+
/** number of online members in this guild */
|
|
4126
|
+
presence_count: number
|
|
4127
|
+
}
|
|
3777
4128
|
export interface GuildWidgetSetting {
|
|
3778
4129
|
/** whether the widget is enabled */
|
|
3779
4130
|
enabled: boolean
|
|
@@ -3782,32 +4133,38 @@ export interface GuildWidgetSetting {
|
|
|
3782
4133
|
}
|
|
3783
4134
|
export type Heartbeat = number | null
|
|
3784
4135
|
export interface HelloEvent {
|
|
3785
|
-
/**
|
|
4136
|
+
/** Interval (in milliseconds) an app should heartbeat with */
|
|
3786
4137
|
heartbeat_interval: number
|
|
3787
4138
|
}
|
|
3788
4139
|
export interface Identify {
|
|
3789
|
-
/**
|
|
4140
|
+
/** Authentication token */
|
|
3790
4141
|
token: string
|
|
3791
|
-
/**
|
|
4142
|
+
/** Connection properties */
|
|
3792
4143
|
properties: IdentifyConnectionProperty
|
|
3793
|
-
/**
|
|
4144
|
+
/** Whether this connection supports compression of packets */
|
|
3794
4145
|
compress?: boolean
|
|
3795
|
-
/**
|
|
4146
|
+
/** Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list */
|
|
3796
4147
|
large_threshold?: number
|
|
3797
|
-
/**
|
|
4148
|
+
/** Used for Guild Sharding */
|
|
3798
4149
|
shard?: number[]
|
|
3799
|
-
/**
|
|
4150
|
+
/** Presence structure for initial presence information */
|
|
3800
4151
|
presence?: UpdatePresence
|
|
3801
|
-
/**
|
|
4152
|
+
/** Gateway Intents you wish to receive */
|
|
3802
4153
|
intents: number
|
|
3803
4154
|
}
|
|
3804
4155
|
export interface IdentifyConnectionProperty {
|
|
3805
|
-
/**
|
|
3806
|
-
|
|
3807
|
-
/**
|
|
3808
|
-
|
|
3809
|
-
/**
|
|
3810
|
-
|
|
4156
|
+
/** Your operating system */
|
|
4157
|
+
os: string
|
|
4158
|
+
/** Your library name */
|
|
4159
|
+
browser: string
|
|
4160
|
+
/** Your library name */
|
|
4161
|
+
device: string
|
|
4162
|
+
}
|
|
4163
|
+
export interface InstallParam {
|
|
4164
|
+
/** the scopes to add the application to the server with */
|
|
4165
|
+
scopes: OAuth2Scope[]
|
|
4166
|
+
/** the permissions to request for the bot role */
|
|
4167
|
+
permissions: string
|
|
3811
4168
|
}
|
|
3812
4169
|
export interface Integration {
|
|
3813
4170
|
/** integration id */
|
|
@@ -3817,7 +4174,7 @@ export interface Integration {
|
|
|
3817
4174
|
/** integration type (twitch, youtube, or discord) */
|
|
3818
4175
|
type: string
|
|
3819
4176
|
/** is this integration enabled */
|
|
3820
|
-
enabled
|
|
4177
|
+
enabled?: boolean
|
|
3821
4178
|
/** is this integration syncing */
|
|
3822
4179
|
syncing?: boolean
|
|
3823
4180
|
/** id that this integration uses for "subscribers" */
|
|
@@ -3840,6 +4197,8 @@ export interface Integration {
|
|
|
3840
4197
|
revoked?: boolean
|
|
3841
4198
|
/** The bot/OAuth2 application for discord integrations */
|
|
3842
4199
|
application?: IntegrationApplication
|
|
4200
|
+
/** the scopes the application has been authorized for */
|
|
4201
|
+
scopes?: OAuth2Scope[]
|
|
3843
4202
|
}
|
|
3844
4203
|
export interface IntegrationAccount {
|
|
3845
4204
|
/** id of the account */
|
|
@@ -3856,23 +4215,21 @@ export interface IntegrationApplication {
|
|
|
3856
4215
|
icon?: string | null
|
|
3857
4216
|
/** the description of the app */
|
|
3858
4217
|
description: string
|
|
3859
|
-
/** the summary of the app */
|
|
3860
|
-
summary: string
|
|
3861
4218
|
/** the bot associated with this application */
|
|
3862
4219
|
bot?: User
|
|
3863
4220
|
}
|
|
3864
4221
|
export type IntegrationCreateEvent = Integration &
|
|
3865
4222
|
IntegrationCreateEventAdditional
|
|
3866
4223
|
export interface IntegrationCreateEventAdditional {
|
|
3867
|
-
/**
|
|
4224
|
+
/** ID of the guild */
|
|
3868
4225
|
guild_id: Snowflake
|
|
3869
4226
|
}
|
|
3870
4227
|
export interface IntegrationDeleteEvent {
|
|
3871
|
-
/**
|
|
4228
|
+
/** Integration ID */
|
|
3872
4229
|
id: Snowflake
|
|
3873
|
-
/**
|
|
4230
|
+
/** ID of the guild */
|
|
3874
4231
|
guild_id: Snowflake
|
|
3875
|
-
/**
|
|
4232
|
+
/** ID of the bot/OAuth2 application for this discord integration */
|
|
3876
4233
|
application_id?: Snowflake
|
|
3877
4234
|
}
|
|
3878
4235
|
export enum IntegrationExpireBehavior {
|
|
@@ -3882,35 +4239,37 @@ export enum IntegrationExpireBehavior {
|
|
|
3882
4239
|
export type IntegrationUpdateEvent = Integration &
|
|
3883
4240
|
IntegrationUpdateEventAdditional
|
|
3884
4241
|
export interface IntegrationUpdateEventAdditional {
|
|
3885
|
-
/**
|
|
4242
|
+
/** ID of the guild */
|
|
3886
4243
|
guild_id: Snowflake
|
|
3887
4244
|
}
|
|
3888
4245
|
export interface Interaction {
|
|
3889
|
-
/**
|
|
4246
|
+
/** ID of the interaction */
|
|
3890
4247
|
id: Snowflake
|
|
3891
|
-
/**
|
|
4248
|
+
/** ID of the application this interaction is for */
|
|
3892
4249
|
application_id: Snowflake
|
|
3893
|
-
/**
|
|
4250
|
+
/** Type of interaction */
|
|
3894
4251
|
type: InteractionType
|
|
3895
|
-
/**
|
|
4252
|
+
/** Interaction data payload */
|
|
3896
4253
|
data?: InteractionDatum
|
|
3897
|
-
/** the
|
|
4254
|
+
/** Guild that the interaction was sent from */
|
|
3898
4255
|
guild_id?: Snowflake
|
|
3899
|
-
/** the
|
|
4256
|
+
/** Channel that the interaction was sent from */
|
|
3900
4257
|
channel_id?: Snowflake
|
|
3901
|
-
/**
|
|
4258
|
+
/** Guild member data for the invoking user, including permissions */
|
|
3902
4259
|
member?: GuildMember
|
|
3903
|
-
/**
|
|
4260
|
+
/** User object for the invoking user, if invoked in a DM */
|
|
3904
4261
|
user?: User
|
|
3905
|
-
/**
|
|
4262
|
+
/** Continuation token for responding to the interaction */
|
|
3906
4263
|
token: string
|
|
3907
|
-
/**
|
|
4264
|
+
/** Read-only property, always 1 */
|
|
3908
4265
|
version: number
|
|
3909
|
-
/**
|
|
4266
|
+
/** For components, the message they were attached to */
|
|
3910
4267
|
message?: Message
|
|
3911
|
-
/** the
|
|
4268
|
+
/** Bitwise set of permissions the app or bot has within the channel the interaction was sent from */
|
|
4269
|
+
app_permissions?: string
|
|
4270
|
+
/** Selected language of the invoking user */
|
|
3912
4271
|
locale?: string
|
|
3913
|
-
/**
|
|
4272
|
+
/** Guild's preferred locale, if invoked in a guild */
|
|
3914
4273
|
guild_locale?: string
|
|
3915
4274
|
}
|
|
3916
4275
|
export interface InteractionCallbackAutocomplete {
|
|
@@ -3940,7 +4299,7 @@ export interface InteractionCallbackMessage {
|
|
|
3940
4299
|
export interface InteractionCallbackModal {
|
|
3941
4300
|
/** a developer-defined identifier for the component, max 100 characters */
|
|
3942
4301
|
custom_id: string
|
|
3943
|
-
/** the title of the popup modal */
|
|
4302
|
+
/** the title of the popup modal, max 45 characters */
|
|
3944
4303
|
title: string
|
|
3945
4304
|
/** between 1 and 5 (inclusive) components that make up the modal */
|
|
3946
4305
|
components: Component[]
|
|
@@ -3962,28 +4321,10 @@ export enum InteractionCallbackType {
|
|
|
3962
4321
|
MODAL = 9,
|
|
3963
4322
|
}
|
|
3964
4323
|
export type InteractionCreateEvent = Interaction
|
|
3965
|
-
export
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
name: string
|
|
3970
|
-
/** the type of the invoked command */
|
|
3971
|
-
type: number
|
|
3972
|
-
/** converted users + roles + channels + attachments */
|
|
3973
|
-
resolved?: ResolvedDatum
|
|
3974
|
-
/** the params + values from the user */
|
|
3975
|
-
options?: ApplicationCommandInteractionDataOption[]
|
|
3976
|
-
/** the custom_id of the component */
|
|
3977
|
-
custom_id?: string
|
|
3978
|
-
/** the type of the component */
|
|
3979
|
-
component_type?: ComponentType
|
|
3980
|
-
/** the values the user selected */
|
|
3981
|
-
values?: SelectOption[]
|
|
3982
|
-
/** id the of user or message targeted by a user or message command */
|
|
3983
|
-
target_id?: Snowflake
|
|
3984
|
-
/** the values submitted by the user */
|
|
3985
|
-
components?: Component[]
|
|
3986
|
-
}
|
|
4324
|
+
export type InteractionDatum =
|
|
4325
|
+
| ApplicationCommandDatum
|
|
4326
|
+
| MessageComponentDatum
|
|
4327
|
+
| ModalSubmitDatum
|
|
3987
4328
|
export interface InteractionResponse {
|
|
3988
4329
|
/** the type of response */
|
|
3989
4330
|
type: InteractionCallbackType
|
|
@@ -4025,37 +4366,37 @@ export interface Invite {
|
|
|
4025
4366
|
guild_scheduled_event?: GuildScheduledEvent
|
|
4026
4367
|
}
|
|
4027
4368
|
export interface InviteCreateEvent {
|
|
4028
|
-
/**
|
|
4369
|
+
/** Channel the invite is for */
|
|
4029
4370
|
channel_id: Snowflake
|
|
4030
|
-
/**
|
|
4371
|
+
/** Unique invite code */
|
|
4031
4372
|
code: string
|
|
4032
|
-
/**
|
|
4373
|
+
/** Time at which the invite was created */
|
|
4033
4374
|
created_at: string
|
|
4034
|
-
/**
|
|
4375
|
+
/** Guild of the invite */
|
|
4035
4376
|
guild_id?: Snowflake
|
|
4036
|
-
/**
|
|
4377
|
+
/** User that created the invite */
|
|
4037
4378
|
inviter?: User
|
|
4038
|
-
/**
|
|
4379
|
+
/** How long the invite is valid for (in seconds) */
|
|
4039
4380
|
max_age: number
|
|
4040
|
-
/**
|
|
4381
|
+
/** Maximum number of times the invite can be used */
|
|
4041
4382
|
max_uses: number
|
|
4042
|
-
/**
|
|
4383
|
+
/** Type of target for this voice channel invite */
|
|
4043
4384
|
target_type?: InviteTargetType
|
|
4044
|
-
/**
|
|
4385
|
+
/** User whose stream to display for this voice channel stream invite */
|
|
4045
4386
|
target_user?: User
|
|
4046
|
-
/**
|
|
4387
|
+
/** Embedded application to open for this voice channel embedded application invite */
|
|
4047
4388
|
target_application?: Application
|
|
4048
|
-
/**
|
|
4389
|
+
/** Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) */
|
|
4049
4390
|
temporary: boolean
|
|
4050
|
-
/**
|
|
4391
|
+
/** How many times the invite has been used (always will be 0) */
|
|
4051
4392
|
uses: number
|
|
4052
4393
|
}
|
|
4053
4394
|
export interface InviteDeleteEvent {
|
|
4054
|
-
/**
|
|
4395
|
+
/** Channel of the invite */
|
|
4055
4396
|
channel_id: Snowflake
|
|
4056
|
-
/**
|
|
4397
|
+
/** Guild of the invite */
|
|
4057
4398
|
guild_id?: Snowflake
|
|
4058
|
-
/**
|
|
4399
|
+
/** Unique invite code */
|
|
4059
4400
|
code: string
|
|
4060
4401
|
}
|
|
4061
4402
|
export interface InviteMetadatum {
|
|
@@ -4084,15 +4425,15 @@ export enum InviteTargetType {
|
|
|
4084
4425
|
STREAM = 1,
|
|
4085
4426
|
EMBEDDED_APPLICATION = 2,
|
|
4086
4427
|
}
|
|
4087
|
-
export
|
|
4088
|
-
/**
|
|
4089
|
-
|
|
4090
|
-
/**
|
|
4091
|
-
|
|
4092
|
-
/**
|
|
4093
|
-
|
|
4428
|
+
export enum KeywordPresetType {
|
|
4429
|
+
/** Words that may be considered forms of swearing or cursing */
|
|
4430
|
+
PROFANITY = 1,
|
|
4431
|
+
/** Words that refer to sexually explicit behavior or activity */
|
|
4432
|
+
SEXUAL_CONTENT = 2,
|
|
4433
|
+
/** Personal insults or words that may be considered hate speech */
|
|
4434
|
+
SLURS = 3,
|
|
4094
4435
|
}
|
|
4095
|
-
export interface
|
|
4436
|
+
export interface ListActiveGuildThreadResponse {
|
|
4096
4437
|
/** the active threads */
|
|
4097
4438
|
threads: Channel[]
|
|
4098
4439
|
/** a thread member object for each returned thread the current user has joined */
|
|
@@ -4150,6 +4491,68 @@ export interface ListScheduledEventsForGuildParams {
|
|
|
4150
4491
|
/** include number of users subscribed to each event */
|
|
4151
4492
|
with_user_count?: boolean
|
|
4152
4493
|
}
|
|
4494
|
+
export interface Locale {
|
|
4495
|
+
/** Danish */
|
|
4496
|
+
da?: string
|
|
4497
|
+
/** German */
|
|
4498
|
+
de?: string
|
|
4499
|
+
/** English, */
|
|
4500
|
+
"en-GB"?: string
|
|
4501
|
+
/** English, */
|
|
4502
|
+
"en-US"?: string
|
|
4503
|
+
/** Spanish */
|
|
4504
|
+
"es-ES"?: string
|
|
4505
|
+
/** French */
|
|
4506
|
+
fr?: string
|
|
4507
|
+
/** Croatian */
|
|
4508
|
+
hr?: string
|
|
4509
|
+
/** Italian */
|
|
4510
|
+
it?: string
|
|
4511
|
+
/** Lithuanian */
|
|
4512
|
+
lt?: string
|
|
4513
|
+
/** Hungarian */
|
|
4514
|
+
hu?: string
|
|
4515
|
+
/** Dutch */
|
|
4516
|
+
nl?: string
|
|
4517
|
+
/** Norwegian */
|
|
4518
|
+
no?: string
|
|
4519
|
+
/** Polish */
|
|
4520
|
+
pl?: string
|
|
4521
|
+
/** Portuguese, Brazilian */
|
|
4522
|
+
"pt-BR"?: string
|
|
4523
|
+
/** Romanian, Romania */
|
|
4524
|
+
ro?: string
|
|
4525
|
+
/** Finnish */
|
|
4526
|
+
fi?: string
|
|
4527
|
+
/** Swedish */
|
|
4528
|
+
"sv-SE"?: string
|
|
4529
|
+
/** Vietnamese */
|
|
4530
|
+
vi?: string
|
|
4531
|
+
/** Turkish */
|
|
4532
|
+
tr?: string
|
|
4533
|
+
/** Czech */
|
|
4534
|
+
cs?: string
|
|
4535
|
+
/** Greek */
|
|
4536
|
+
el?: string
|
|
4537
|
+
/** Bulgarian */
|
|
4538
|
+
bg?: string
|
|
4539
|
+
/** Russian */
|
|
4540
|
+
ru?: string
|
|
4541
|
+
/** Ukrainian */
|
|
4542
|
+
uk?: string
|
|
4543
|
+
/** Hindi */
|
|
4544
|
+
hi?: string
|
|
4545
|
+
/** Thai */
|
|
4546
|
+
th?: string
|
|
4547
|
+
/** Chinese, China */
|
|
4548
|
+
"zh-CN"?: string
|
|
4549
|
+
/** Japanese */
|
|
4550
|
+
ja?: string
|
|
4551
|
+
/** Chinese, Taiwan */
|
|
4552
|
+
"zh-TW"?: string
|
|
4553
|
+
/** Korean */
|
|
4554
|
+
ko?: string
|
|
4555
|
+
}
|
|
4153
4556
|
export enum MembershipState {
|
|
4154
4557
|
INVITED = 1,
|
|
4155
4558
|
ACCEPTED = 2,
|
|
@@ -4159,12 +4562,8 @@ export interface Message {
|
|
|
4159
4562
|
id: Snowflake
|
|
4160
4563
|
/** id of the channel the message was sent in */
|
|
4161
4564
|
channel_id: Snowflake
|
|
4162
|
-
/** id of the guild the message was sent in */
|
|
4163
|
-
guild_id?: Snowflake
|
|
4164
4565
|
/** the author of this message (not guaranteed to be a valid user, see below) */
|
|
4165
4566
|
author: User
|
|
4166
|
-
/** member properties for this message's author */
|
|
4167
|
-
member?: GuildMember
|
|
4168
4567
|
/** contents of the message */
|
|
4169
4568
|
content: string
|
|
4170
4569
|
/** when this message was sent */
|
|
@@ -4217,6 +4616,8 @@ export interface Message {
|
|
|
4217
4616
|
sticker_items?: StickerItem[]
|
|
4218
4617
|
/** Deprecated the stickers sent with the message */
|
|
4219
4618
|
stickers?: Sticker[]
|
|
4619
|
+
/** A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with total_message_sent on parent thread */
|
|
4620
|
+
position?: number
|
|
4220
4621
|
}
|
|
4221
4622
|
export interface MessageActivity {
|
|
4222
4623
|
/** type of message activity */
|
|
@@ -4230,21 +4631,37 @@ export enum MessageActivityType {
|
|
|
4230
4631
|
LISTEN = 3,
|
|
4231
4632
|
JOIN_REQUEST = 5,
|
|
4232
4633
|
}
|
|
4233
|
-
export
|
|
4634
|
+
export interface MessageComponentDatum {
|
|
4635
|
+
/** the custom_id of the component */
|
|
4636
|
+
custom_id: string
|
|
4637
|
+
/** the type of the component */
|
|
4638
|
+
component_type: ComponentType
|
|
4639
|
+
/** values the user selected in a select menu component */
|
|
4640
|
+
values?: SelectOption[]
|
|
4641
|
+
}
|
|
4642
|
+
export type MessageCreateEvent = Message & MessageCreateExtra
|
|
4643
|
+
export interface MessageCreateExtra {
|
|
4644
|
+
/** ID of the guild the message was sent in - unless it is an ephemeral message */
|
|
4645
|
+
guild_id?: Snowflake
|
|
4646
|
+
/** Member properties for this message's author. Missing for ephemeral messages and messages from webhooks */
|
|
4647
|
+
member?: GuildMember
|
|
4648
|
+
/** Users specifically mentioned in the message */
|
|
4649
|
+
mentions: User[]
|
|
4650
|
+
}
|
|
4234
4651
|
export interface MessageDeleteBulkEvent {
|
|
4235
|
-
/**
|
|
4652
|
+
/** IDs of the messages */
|
|
4236
4653
|
ids: Snowflake[]
|
|
4237
|
-
/**
|
|
4654
|
+
/** ID of the channel */
|
|
4238
4655
|
channel_id: Snowflake
|
|
4239
|
-
/**
|
|
4656
|
+
/** ID of the guild */
|
|
4240
4657
|
guild_id?: Snowflake
|
|
4241
4658
|
}
|
|
4242
4659
|
export interface MessageDeleteEvent {
|
|
4243
|
-
/**
|
|
4660
|
+
/** ID of the message */
|
|
4244
4661
|
id: Snowflake
|
|
4245
|
-
/**
|
|
4662
|
+
/** ID of the channel */
|
|
4246
4663
|
channel_id: Snowflake
|
|
4247
|
-
/**
|
|
4664
|
+
/** ID of the guild */
|
|
4248
4665
|
guild_id?: Snowflake
|
|
4249
4666
|
}
|
|
4250
4667
|
export const MessageFlag = {
|
|
@@ -4268,59 +4685,59 @@ export const MessageFlag = {
|
|
|
4268
4685
|
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: 1 << 8,
|
|
4269
4686
|
} as const
|
|
4270
4687
|
export interface MessageInteraction {
|
|
4271
|
-
/**
|
|
4688
|
+
/** ID of the interaction */
|
|
4272
4689
|
id: Snowflake
|
|
4273
|
-
/**
|
|
4690
|
+
/** Type of interaction */
|
|
4274
4691
|
type: InteractionType
|
|
4275
|
-
/**
|
|
4692
|
+
/** Name of the application command, including subcommands and subcommand groups */
|
|
4276
4693
|
name: string
|
|
4277
|
-
/**
|
|
4694
|
+
/** User who invoked the interaction */
|
|
4278
4695
|
user: User
|
|
4279
|
-
/**
|
|
4696
|
+
/** Member who invoked the interaction in the guild */
|
|
4280
4697
|
member?: GuildMember
|
|
4281
4698
|
}
|
|
4282
4699
|
export interface MessageReactionAddEvent {
|
|
4283
|
-
/**
|
|
4700
|
+
/** ID of the user */
|
|
4284
4701
|
user_id: Snowflake
|
|
4285
|
-
/**
|
|
4702
|
+
/** ID of the channel */
|
|
4286
4703
|
channel_id: Snowflake
|
|
4287
|
-
/**
|
|
4704
|
+
/** ID of the message */
|
|
4288
4705
|
message_id: Snowflake
|
|
4289
|
-
/**
|
|
4706
|
+
/** ID of the guild */
|
|
4290
4707
|
guild_id?: Snowflake
|
|
4291
|
-
/**
|
|
4708
|
+
/** Member who reacted if this happened in a guild */
|
|
4292
4709
|
member?: GuildMember
|
|
4293
|
-
/**
|
|
4710
|
+
/** Emoji used to react - example */
|
|
4294
4711
|
emoji: Emoji
|
|
4295
4712
|
}
|
|
4296
4713
|
export interface MessageReactionRemoveAllEvent {
|
|
4297
|
-
/**
|
|
4714
|
+
/** ID of the channel */
|
|
4298
4715
|
channel_id: Snowflake
|
|
4299
|
-
/**
|
|
4716
|
+
/** ID of the message */
|
|
4300
4717
|
message_id: Snowflake
|
|
4301
|
-
/**
|
|
4718
|
+
/** ID of the guild */
|
|
4302
4719
|
guild_id?: Snowflake
|
|
4303
4720
|
}
|
|
4304
4721
|
export interface MessageReactionRemoveEmojiEvent {
|
|
4305
|
-
/**
|
|
4722
|
+
/** ID of the channel */
|
|
4306
4723
|
channel_id: Snowflake
|
|
4307
|
-
/**
|
|
4724
|
+
/** ID of the guild */
|
|
4308
4725
|
guild_id?: Snowflake
|
|
4309
|
-
/**
|
|
4726
|
+
/** ID of the message */
|
|
4310
4727
|
message_id: Snowflake
|
|
4311
|
-
/**
|
|
4728
|
+
/** Emoji that was removed */
|
|
4312
4729
|
emoji: Emoji
|
|
4313
4730
|
}
|
|
4314
4731
|
export interface MessageReactionRemoveEvent {
|
|
4315
|
-
/**
|
|
4732
|
+
/** ID of the user */
|
|
4316
4733
|
user_id: Snowflake
|
|
4317
|
-
/**
|
|
4734
|
+
/** ID of the channel */
|
|
4318
4735
|
channel_id: Snowflake
|
|
4319
|
-
/**
|
|
4736
|
+
/** ID of the message */
|
|
4320
4737
|
message_id: Snowflake
|
|
4321
|
-
/**
|
|
4738
|
+
/** ID of the guild */
|
|
4322
4739
|
guild_id?: Snowflake
|
|
4323
|
-
/**
|
|
4740
|
+
/** Emoji used to react - example */
|
|
4324
4741
|
emoji: Emoji
|
|
4325
4742
|
}
|
|
4326
4743
|
export interface MessageReference {
|
|
@@ -4341,11 +4758,11 @@ export enum MessageType {
|
|
|
4341
4758
|
CHANNEL_NAME_CHANGE = 4,
|
|
4342
4759
|
CHANNEL_ICON_CHANGE = 5,
|
|
4343
4760
|
CHANNEL_PINNED_MESSAGE = 6,
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4761
|
+
USER_JOIN = 7,
|
|
4762
|
+
GUILD_BOOST = 8,
|
|
4763
|
+
GUILD_BOOST_TIER_1 = 9,
|
|
4764
|
+
GUILD_BOOST_TIER_2 = 10,
|
|
4765
|
+
GUILD_BOOST_TIER_3 = 11,
|
|
4349
4766
|
CHANNEL_FOLLOW_ADD = 12,
|
|
4350
4767
|
GUILD_DISCOVERY_DISQUALIFIED = 14,
|
|
4351
4768
|
GUILD_DISCOVERY_REQUALIFIED = 15,
|
|
@@ -4357,14 +4774,37 @@ export enum MessageType {
|
|
|
4357
4774
|
THREAD_STARTER_MESSAGE = 21,
|
|
4358
4775
|
GUILD_INVITE_REMINDER = 22,
|
|
4359
4776
|
CONTEXT_MENU_COMMAND = 23,
|
|
4777
|
+
AUTO_MODERATION_ACTION = 24,
|
|
4360
4778
|
}
|
|
4361
|
-
export type MessageUpdateEvent =
|
|
4779
|
+
export type MessageUpdateEvent = MessageCreateEvent
|
|
4362
4780
|
export enum MfaLevel {
|
|
4363
4781
|
/** guild has no MFA/2FA requirement for moderation actions */
|
|
4364
4782
|
NONE = 0,
|
|
4365
4783
|
/** guild has a 2FA requirement for moderation actions */
|
|
4366
4784
|
ELEVATED = 1,
|
|
4367
4785
|
}
|
|
4786
|
+
export interface ModalSubmitDatum {
|
|
4787
|
+
/** the custom_id of the modal */
|
|
4788
|
+
custom_id: string
|
|
4789
|
+
/** the values submitted by the user */
|
|
4790
|
+
components: Component[]
|
|
4791
|
+
}
|
|
4792
|
+
export interface ModifyAutoModerationRuleParams {
|
|
4793
|
+
/** the rule name */
|
|
4794
|
+
name: string
|
|
4795
|
+
/** the event type */
|
|
4796
|
+
event_type: EventType
|
|
4797
|
+
/** the trigger metadata */
|
|
4798
|
+
trigger_metadata?: TriggerMetadatum
|
|
4799
|
+
/** the actions which will execute when the rule is triggered */
|
|
4800
|
+
actions: AutoModerationAction[]
|
|
4801
|
+
/** whether the rule is enabled */
|
|
4802
|
+
enabled: boolean
|
|
4803
|
+
/** the role ids that should not be affected by the rule (Maximum of 20) */
|
|
4804
|
+
exempt_roles: Snowflake[]
|
|
4805
|
+
/** the channel ids that should not be affected by the rule (Maximum of 50) */
|
|
4806
|
+
exempt_channels: Snowflake[]
|
|
4807
|
+
}
|
|
4368
4808
|
export interface ModifyChannelGroupDmParams {
|
|
4369
4809
|
/** 1-100 character channel name */
|
|
4370
4810
|
name: string
|
|
@@ -4374,17 +4814,17 @@ export interface ModifyChannelGroupDmParams {
|
|
|
4374
4814
|
export interface ModifyChannelGuildChannelParams {
|
|
4375
4815
|
/** 1-100 character channel name */
|
|
4376
4816
|
name: string
|
|
4377
|
-
/** the type of channel; only conversion between text and
|
|
4817
|
+
/** the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature */
|
|
4378
4818
|
type: ChannelType
|
|
4379
4819
|
/** the position of the channel in the left-hand listing */
|
|
4380
4820
|
position?: number | null
|
|
4381
|
-
/** 0-1024 character channel topic */
|
|
4821
|
+
/** 0-1024 character channel topic (0-4096 characters for GUILD_FORUM channels) */
|
|
4382
4822
|
topic?: string | null
|
|
4383
4823
|
/** whether the channel is nsfw */
|
|
4384
4824
|
nsfw?: boolean | null
|
|
4385
4825
|
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected */
|
|
4386
4826
|
rate_limit_per_user?: number | null
|
|
4387
|
-
/** the bitrate (in bits) of the voice channel; 8000
|
|
4827
|
+
/** the bitrate (in bits) of the voice or stage channel; min 8000 */
|
|
4388
4828
|
bitrate?: number | null
|
|
4389
4829
|
/** the user limit of the voice channel; 0 refers to no limit, 1 to 99 refers to a user limit */
|
|
4390
4830
|
user_limit?: number | null
|
|
@@ -4398,6 +4838,16 @@ export interface ModifyChannelGuildChannelParams {
|
|
|
4398
4838
|
video_quality_mode?: VideoQualityMode | null
|
|
4399
4839
|
/** the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */
|
|
4400
4840
|
default_auto_archive_duration?: number | null
|
|
4841
|
+
/** channel flags combined as a bitfield. Currently only REQUIRE_TAG (1 << 4) is supported. */
|
|
4842
|
+
flags?: number
|
|
4843
|
+
/** the set of tags that can be used in a GUILD_FORUM channel; limited to 20 */
|
|
4844
|
+
available_tags?: ForumTag[]
|
|
4845
|
+
/** the emoji to show in the add reaction button on a thread in a GUILD_FORUM channel */
|
|
4846
|
+
default_reaction_emoji?: DefaultReaction | null
|
|
4847
|
+
/** the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update. */
|
|
4848
|
+
default_thread_rate_limit_per_user?: number
|
|
4849
|
+
/** the default sort order type used to order posts in GUILD_FORUM channels */
|
|
4850
|
+
default_sort_order?: SortOrderType | null
|
|
4401
4851
|
}
|
|
4402
4852
|
export type ModifyChannelParams =
|
|
4403
4853
|
| ModifyChannelGroupDmParams
|
|
@@ -4408,7 +4858,7 @@ export interface ModifyChannelThreadParams {
|
|
|
4408
4858
|
name: string
|
|
4409
4859
|
/** whether the thread is archived */
|
|
4410
4860
|
archived: boolean
|
|
4411
|
-
/**
|
|
4861
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
4412
4862
|
auto_archive_duration: number
|
|
4413
4863
|
/** whether the thread is locked; when a thread is locked, only users with MANAGE_THREADS can unarchive it */
|
|
4414
4864
|
locked: boolean
|
|
@@ -4416,6 +4866,10 @@ export interface ModifyChannelThreadParams {
|
|
|
4416
4866
|
invitable: boolean
|
|
4417
4867
|
/** amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages, manage_thread, or manage_channel, are unaffected */
|
|
4418
4868
|
rate_limit_per_user?: number | null
|
|
4869
|
+
/** channel flags combined as a bitfield; PINNED can only be set for threads in forum channels */
|
|
4870
|
+
flags?: number
|
|
4871
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel; limited to 5 */
|
|
4872
|
+
applied_tags?: Snowflake[]
|
|
4419
4873
|
}
|
|
4420
4874
|
export interface ModifyCurrentMemberParams {
|
|
4421
4875
|
/** value to set user's nickname to */
|
|
@@ -4433,7 +4887,7 @@ export interface ModifyCurrentUserParams {
|
|
|
4433
4887
|
}
|
|
4434
4888
|
export interface ModifyCurrentUserVoiceStateParams {
|
|
4435
4889
|
/** the id of the channel the user is currently in */
|
|
4436
|
-
channel_id
|
|
4890
|
+
channel_id?: Snowflake
|
|
4437
4891
|
/** toggles the user's suppress state */
|
|
4438
4892
|
suppress?: boolean
|
|
4439
4893
|
/** sets the user's request to speak */
|
|
@@ -4467,7 +4921,11 @@ export interface ModifyGuildMemberParams {
|
|
|
4467
4921
|
/** id of channel to move user to (if they are connected to voice) */
|
|
4468
4922
|
channel_id: Snowflake
|
|
4469
4923
|
/** when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild */
|
|
4470
|
-
communication_disabled_until
|
|
4924
|
+
communication_disabled_until: string
|
|
4925
|
+
}
|
|
4926
|
+
export interface ModifyGuildMfaLevelParams {
|
|
4927
|
+
/** MFA level */
|
|
4928
|
+
level: MfaLevel
|
|
4471
4929
|
}
|
|
4472
4930
|
export interface ModifyGuildParams {
|
|
4473
4931
|
/** guild name */
|
|
@@ -4482,7 +4940,7 @@ export interface ModifyGuildParams {
|
|
|
4482
4940
|
explicit_content_filter?: ExplicitContentFilterLevel | null
|
|
4483
4941
|
/** id for afk channel */
|
|
4484
4942
|
afk_channel_id?: Snowflake | null
|
|
4485
|
-
/** afk timeout in seconds */
|
|
4943
|
+
/** afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600 */
|
|
4486
4944
|
afk_timeout: number
|
|
4487
4945
|
/** base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the ANIMATED_ICON feature) */
|
|
4488
4946
|
icon?: string | null
|
|
@@ -4492,7 +4950,7 @@ export interface ModifyGuildParams {
|
|
|
4492
4950
|
splash?: string | null
|
|
4493
4951
|
/** base64 16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature) */
|
|
4494
4952
|
discovery_splash?: string | null
|
|
4495
|
-
/** base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature) */
|
|
4953
|
+
/** base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature; can be animated gif when the server has the ANIMATED_BANNER feature) */
|
|
4496
4954
|
banner?: string | null
|
|
4497
4955
|
/** the id of the channel where guild notices such as welcome messages and boost events are posted */
|
|
4498
4956
|
system_channel_id?: Snowflake | null
|
|
@@ -4506,13 +4964,13 @@ export interface ModifyGuildParams {
|
|
|
4506
4964
|
preferred_locale?: string | null
|
|
4507
4965
|
/** enabled guild features */
|
|
4508
4966
|
features: GuildFeature[]
|
|
4509
|
-
/** the description for the guild
|
|
4967
|
+
/** the description for the guild */
|
|
4510
4968
|
description?: string | null
|
|
4511
|
-
/** whether the guild's boost progress bar should be enabled
|
|
4969
|
+
/** whether the guild's boost progress bar should be enabled */
|
|
4512
4970
|
premium_progress_bar_enabled: boolean
|
|
4513
4971
|
}
|
|
4514
4972
|
export interface ModifyGuildRoleParams {
|
|
4515
|
-
/** name of the role */
|
|
4973
|
+
/** name of the role, max 100 characters */
|
|
4516
4974
|
name: string
|
|
4517
4975
|
/** bitwise value of the enabled/disabled permissions */
|
|
4518
4976
|
permissions: string
|
|
@@ -4597,6 +5055,67 @@ export interface ModifyWebhookParams {
|
|
|
4597
5055
|
/** the new channel id this webhook should be moved to */
|
|
4598
5056
|
channel_id: Snowflake
|
|
4599
5057
|
}
|
|
5058
|
+
export enum MutableGuildFeature {
|
|
5059
|
+
COMMUNITY = "COMMUNITY",
|
|
5060
|
+
INVITES_DISABLED = "INVITES_DISABLED",
|
|
5061
|
+
DISCOVERABLE = "DISCOVERABLE",
|
|
5062
|
+
}
|
|
5063
|
+
export enum OAuth2Scope {
|
|
5064
|
+
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */
|
|
5065
|
+
ACTIVITIES_READ = "activities.read",
|
|
5066
|
+
/** allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
|
|
5067
|
+
ACTIVITIES_WRITE = "activities.write",
|
|
5068
|
+
/** allows your app to read build data for a user's applications */
|
|
5069
|
+
APPLICATIONS_BUILDS_READ = "applications.builds.read",
|
|
5070
|
+
/** allows your app to upload/update builds for a user's applications - requires Discord approval */
|
|
5071
|
+
APPLICATIONS_BUILDS_UPLOAD = "applications.builds.upload",
|
|
5072
|
+
/** allows your app to use commands in a guild */
|
|
5073
|
+
APPLICATIONS_COMMANDS = "applications.commands",
|
|
5074
|
+
/** allows your app to update its commands using a Bearer token - client credentials grant only */
|
|
5075
|
+
APPLICATIONS_COMMANDS_UPDATE = "applications.commands.update",
|
|
5076
|
+
/** allows your app to update permissions for its commands in a guild a user has permissions to */
|
|
5077
|
+
APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE = "applications.commands.permissions.update",
|
|
5078
|
+
/** allows your app to read entitlements for a user's applications */
|
|
5079
|
+
APPLICATIONS_ENTITLEMENTS = "applications.entitlements",
|
|
5080
|
+
/** allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */
|
|
5081
|
+
APPLICATIONS_STORE_UPDATE = "applications.store.update",
|
|
5082
|
+
/** for oauth2 bots, this puts the bot in the user's selected guild by default */
|
|
5083
|
+
BOT = "bot",
|
|
5084
|
+
/** allows /users/@me/connections to return linked third-party accounts */
|
|
5085
|
+
CONNECTIONS = "connections",
|
|
5086
|
+
/** allows your app to see information about the user's DMs and group DMs - requires Discord approval */
|
|
5087
|
+
DM_CHANNELS_READ = "dm_channels.read",
|
|
5088
|
+
/** enables /users/@me to return an email */
|
|
5089
|
+
EMAIL = "email",
|
|
5090
|
+
/** allows your app to join users to a group dm */
|
|
5091
|
+
GDM_JOIN = "gdm.join",
|
|
5092
|
+
/** allows /users/@me/guilds to return basic information about all of a user's guilds */
|
|
5093
|
+
GUILDS = "guilds",
|
|
5094
|
+
/** allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild */
|
|
5095
|
+
GUILDS_JOIN = "guilds.join",
|
|
5096
|
+
/** allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild */
|
|
5097
|
+
GUILDS_MEMBERS_READ = "guilds.members.read",
|
|
5098
|
+
/** allows /users/@me without email */
|
|
5099
|
+
IDENTIFY = "identify",
|
|
5100
|
+
/** for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) */
|
|
5101
|
+
MESSAGES_READ = "messages.read",
|
|
5102
|
+
/** allows your app to know a user's friends and implicit relationships - requires Discord approval */
|
|
5103
|
+
RELATIONSHIPS_READ = "relationships.read",
|
|
5104
|
+
/** for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */
|
|
5105
|
+
RPC = "rpc",
|
|
5106
|
+
/** for local rpc server access, this allows you to update a user's activity - requires Discord approval */
|
|
5107
|
+
RPC_ACTIVITIES_WRITE = "rpc.activities.write",
|
|
5108
|
+
/** for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval */
|
|
5109
|
+
RPC_NOTIFICATIONS_READ = "rpc.notifications.read",
|
|
5110
|
+
/** for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval */
|
|
5111
|
+
RPC_VOICE_READ = "rpc.voice.read",
|
|
5112
|
+
/** for local rpc server access, this allows you to update a user's voice settings - requires Discord approval */
|
|
5113
|
+
RPC_VOICE_WRITE = "rpc.voice.write",
|
|
5114
|
+
/** allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */
|
|
5115
|
+
VOICE = "voice",
|
|
5116
|
+
/** this generates a webhook that is returned in the oauth token response for authorization code grants */
|
|
5117
|
+
WEBHOOK_INCOMING = "webhook.incoming",
|
|
5118
|
+
}
|
|
4600
5119
|
export interface Overwrite {
|
|
4601
5120
|
/** role or user id */
|
|
4602
5121
|
id: Snowflake
|
|
@@ -4630,7 +5149,7 @@ export const PermissionFlag = {
|
|
|
4630
5149
|
STREAM: BigInt(1) << BigInt(9),
|
|
4631
5150
|
/** Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels */
|
|
4632
5151
|
VIEW_CHANNEL: BigInt(1) << BigInt(10),
|
|
4633
|
-
/** Allows for sending messages in a channel (does not allow sending messages in threads) */
|
|
5152
|
+
/** Allows for sending messages in a channel and creating threads in a forum (does not allow sending messages in threads) */
|
|
4634
5153
|
SEND_MESSAGES: BigInt(1) << BigInt(11),
|
|
4635
5154
|
/** Allows for sending of /tts messages */
|
|
4636
5155
|
SEND_TTS_MESSAGES: BigInt(1) << BigInt(12),
|
|
@@ -4705,17 +5224,18 @@ export enum PremiumType {
|
|
|
4705
5224
|
NONE = 0,
|
|
4706
5225
|
NITRO_CLASSIC = 1,
|
|
4707
5226
|
NITRO = 2,
|
|
5227
|
+
NITRO_BASIC = 3,
|
|
4708
5228
|
}
|
|
4709
5229
|
export interface PresenceUpdateEvent {
|
|
4710
|
-
/**
|
|
5230
|
+
/** User whose presence is being updated */
|
|
4711
5231
|
user: User
|
|
4712
|
-
/**
|
|
5232
|
+
/** ID of the guild */
|
|
4713
5233
|
guild_id: Snowflake
|
|
4714
|
-
/**
|
|
5234
|
+
/** Either "idle", "dnd", "online", or "offline" */
|
|
4715
5235
|
status: string
|
|
4716
|
-
/**
|
|
5236
|
+
/** User's current activities */
|
|
4717
5237
|
activities: Activity[]
|
|
4718
|
-
/**
|
|
5238
|
+
/** User's platform-dependent status */
|
|
4719
5239
|
client_status: ClientStatus
|
|
4720
5240
|
}
|
|
4721
5241
|
export enum PrivacyLevel {
|
|
@@ -4733,22 +5253,153 @@ export interface Reaction {
|
|
|
4733
5253
|
emoji: Emoji
|
|
4734
5254
|
}
|
|
4735
5255
|
export interface ReadyEvent {
|
|
4736
|
-
/**
|
|
5256
|
+
/** API version */
|
|
4737
5257
|
v: number
|
|
4738
|
-
/**
|
|
5258
|
+
/** Information about the user including email */
|
|
4739
5259
|
user: User
|
|
4740
|
-
/**
|
|
5260
|
+
/** Guilds the user is in */
|
|
4741
5261
|
guilds: UnavailableGuild[]
|
|
4742
|
-
/**
|
|
5262
|
+
/** Used for resuming connections */
|
|
4743
5263
|
session_id: string
|
|
4744
|
-
/**
|
|
5264
|
+
/** Gateway URL for resuming connections */
|
|
5265
|
+
resume_gateway_url: string
|
|
5266
|
+
/** Shard information associated with this session, if sent when identifying */
|
|
4745
5267
|
shard?: number[]
|
|
4746
|
-
/**
|
|
5268
|
+
/** Contains id and flags */
|
|
4747
5269
|
application: Application
|
|
4748
5270
|
}
|
|
5271
|
+
export type ReceiveEvent =
|
|
5272
|
+
| HelloEvent
|
|
5273
|
+
| ReadyEvent
|
|
5274
|
+
| ResumedEvent
|
|
5275
|
+
| ReconnectEvent
|
|
5276
|
+
| InvalidSessionEvent
|
|
5277
|
+
| ApplicationCommandPermissionsUpdateEvent
|
|
5278
|
+
| AutoModerationRuleCreateEvent
|
|
5279
|
+
| AutoModerationRuleUpdateEvent
|
|
5280
|
+
| AutoModerationRuleDeleteEvent
|
|
5281
|
+
| AutoModerationActionExecutionEvent
|
|
5282
|
+
| ChannelCreateEvent
|
|
5283
|
+
| ChannelUpdateEvent
|
|
5284
|
+
| ChannelDeleteEvent
|
|
5285
|
+
| ChannelPinsUpdateEvent
|
|
5286
|
+
| ThreadCreateEvent
|
|
5287
|
+
| ThreadUpdateEvent
|
|
5288
|
+
| ThreadDeleteEvent
|
|
5289
|
+
| ThreadListSyncEvent
|
|
5290
|
+
| ThreadMemberUpdateEvent
|
|
5291
|
+
| ThreadMembersUpdateEvent
|
|
5292
|
+
| GuildCreateEvent
|
|
5293
|
+
| GuildUpdateEvent
|
|
5294
|
+
| GuildDeleteEvent
|
|
5295
|
+
| GuildBanAddEvent
|
|
5296
|
+
| GuildBanRemoveEvent
|
|
5297
|
+
| GuildEmojisUpdateEvent
|
|
5298
|
+
| GuildStickersUpdateEvent
|
|
5299
|
+
| GuildIntegrationsUpdateEvent
|
|
5300
|
+
| GuildMemberAddEvent
|
|
5301
|
+
| GuildMemberRemoveEvent
|
|
5302
|
+
| GuildMemberUpdateEvent
|
|
5303
|
+
| GuildMembersChunkEvent
|
|
5304
|
+
| GuildRoleCreateEvent
|
|
5305
|
+
| GuildRoleUpdateEvent
|
|
5306
|
+
| GuildRoleDeleteEvent
|
|
5307
|
+
| GuildScheduledEventCreateEvent
|
|
5308
|
+
| GuildScheduledEventUpdateEvent
|
|
5309
|
+
| GuildScheduledEventDeleteEvent
|
|
5310
|
+
| GuildScheduledEventUserAddEvent
|
|
5311
|
+
| GuildScheduledEventUserRemoveEvent
|
|
5312
|
+
| IntegrationCreateEvent
|
|
5313
|
+
| IntegrationUpdateEvent
|
|
5314
|
+
| IntegrationDeleteEvent
|
|
5315
|
+
| InteractionCreateEvent
|
|
5316
|
+
| InviteCreateEvent
|
|
5317
|
+
| InviteDeleteEvent
|
|
5318
|
+
| MessageCreateEvent
|
|
5319
|
+
| MessageUpdateEvent
|
|
5320
|
+
| MessageDeleteEvent
|
|
5321
|
+
| MessageDeleteBulkEvent
|
|
5322
|
+
| MessageReactionAddEvent
|
|
5323
|
+
| MessageReactionRemoveEvent
|
|
5324
|
+
| MessageReactionRemoveAllEvent
|
|
5325
|
+
| MessageReactionRemoveEmojiEvent
|
|
5326
|
+
| PresenceUpdateEvent
|
|
5327
|
+
| StageInstanceCreateEvent
|
|
5328
|
+
| StageInstanceUpdateEvent
|
|
5329
|
+
| StageInstanceDeleteEvent
|
|
5330
|
+
| TypingStartEvent
|
|
5331
|
+
| UserUpdateEvent
|
|
5332
|
+
| VoiceStateUpdateEvent
|
|
5333
|
+
| VoiceServerUpdateEvent
|
|
5334
|
+
| WebhooksUpdateEvent
|
|
5335
|
+
export interface ReceiveEvents {
|
|
5336
|
+
HELLO: HelloEvent
|
|
5337
|
+
READY: ReadyEvent
|
|
5338
|
+
RESUMED: ResumedEvent
|
|
5339
|
+
RECONNECT: ReconnectEvent
|
|
5340
|
+
INVALID_SESSION: InvalidSessionEvent
|
|
5341
|
+
APPLICATION_COMMAND_PERMISSIONS_UPDATE: ApplicationCommandPermissionsUpdateEvent
|
|
5342
|
+
AUTO_MODERATION_RULE_CREATE: AutoModerationRuleCreateEvent
|
|
5343
|
+
AUTO_MODERATION_RULE_UPDATE: AutoModerationRuleUpdateEvent
|
|
5344
|
+
AUTO_MODERATION_RULE_DELETE: AutoModerationRuleDeleteEvent
|
|
5345
|
+
AUTO_MODERATION_ACTION_EXECUTION: AutoModerationActionExecutionEvent
|
|
5346
|
+
CHANNEL_CREATE: ChannelCreateEvent
|
|
5347
|
+
CHANNEL_UPDATE: ChannelUpdateEvent
|
|
5348
|
+
CHANNEL_DELETE: ChannelDeleteEvent
|
|
5349
|
+
CHANNEL_PINS_UPDATE: ChannelPinsUpdateEvent
|
|
5350
|
+
THREAD_CREATE: ThreadCreateEvent
|
|
5351
|
+
THREAD_UPDATE: ThreadUpdateEvent
|
|
5352
|
+
THREAD_DELETE: ThreadDeleteEvent
|
|
5353
|
+
THREAD_LIST_SYNC: ThreadListSyncEvent
|
|
5354
|
+
THREAD_MEMBER_UPDATE: ThreadMemberUpdateEvent
|
|
5355
|
+
THREAD_MEMBERS_UPDATE: ThreadMembersUpdateEvent
|
|
5356
|
+
GUILD_CREATE: GuildCreateEvent
|
|
5357
|
+
GUILD_UPDATE: GuildUpdateEvent
|
|
5358
|
+
GUILD_DELETE: GuildDeleteEvent
|
|
5359
|
+
GUILD_BAN_ADD: GuildBanAddEvent
|
|
5360
|
+
GUILD_BAN_REMOVE: GuildBanRemoveEvent
|
|
5361
|
+
GUILD_EMOJIS_UPDATE: GuildEmojisUpdateEvent
|
|
5362
|
+
GUILD_STICKERS_UPDATE: GuildStickersUpdateEvent
|
|
5363
|
+
GUILD_INTEGRATIONS_UPDATE: GuildIntegrationsUpdateEvent
|
|
5364
|
+
GUILD_MEMBER_ADD: GuildMemberAddEvent
|
|
5365
|
+
GUILD_MEMBER_REMOVE: GuildMemberRemoveEvent
|
|
5366
|
+
GUILD_MEMBER_UPDATE: GuildMemberUpdateEvent
|
|
5367
|
+
GUILD_MEMBERS_CHUNK: GuildMembersChunkEvent
|
|
5368
|
+
GUILD_ROLE_CREATE: GuildRoleCreateEvent
|
|
5369
|
+
GUILD_ROLE_UPDATE: GuildRoleUpdateEvent
|
|
5370
|
+
GUILD_ROLE_DELETE: GuildRoleDeleteEvent
|
|
5371
|
+
GUILD_SCHEDULED_EVENT_CREATE: GuildScheduledEventCreateEvent
|
|
5372
|
+
GUILD_SCHEDULED_EVENT_UPDATE: GuildScheduledEventUpdateEvent
|
|
5373
|
+
GUILD_SCHEDULED_EVENT_DELETE: GuildScheduledEventDeleteEvent
|
|
5374
|
+
GUILD_SCHEDULED_EVENT_USER_ADD: GuildScheduledEventUserAddEvent
|
|
5375
|
+
GUILD_SCHEDULED_EVENT_USER_REMOVE: GuildScheduledEventUserRemoveEvent
|
|
5376
|
+
INTEGRATION_CREATE: IntegrationCreateEvent
|
|
5377
|
+
INTEGRATION_UPDATE: IntegrationUpdateEvent
|
|
5378
|
+
INTEGRATION_DELETE: IntegrationDeleteEvent
|
|
5379
|
+
INTERACTION_CREATE: InteractionCreateEvent
|
|
5380
|
+
INVITE_CREATE: InviteCreateEvent
|
|
5381
|
+
INVITE_DELETE: InviteDeleteEvent
|
|
5382
|
+
MESSAGE_CREATE: MessageCreateEvent
|
|
5383
|
+
MESSAGE_UPDATE: MessageUpdateEvent
|
|
5384
|
+
MESSAGE_DELETE: MessageDeleteEvent
|
|
5385
|
+
MESSAGE_DELETE_BULK: MessageDeleteBulkEvent
|
|
5386
|
+
MESSAGE_REACTION_ADD: MessageReactionAddEvent
|
|
5387
|
+
MESSAGE_REACTION_REMOVE: MessageReactionRemoveEvent
|
|
5388
|
+
MESSAGE_REACTION_REMOVE_ALL: MessageReactionRemoveAllEvent
|
|
5389
|
+
MESSAGE_REACTION_REMOVE_EMOJI: MessageReactionRemoveEmojiEvent
|
|
5390
|
+
PRESENCE_UPDATE: PresenceUpdateEvent
|
|
5391
|
+
STAGE_INSTANCE_CREATE: StageInstanceCreateEvent
|
|
5392
|
+
STAGE_INSTANCE_UPDATE: StageInstanceUpdateEvent
|
|
5393
|
+
STAGE_INSTANCE_DELETE: StageInstanceDeleteEvent
|
|
5394
|
+
TYPING_START: TypingStartEvent
|
|
5395
|
+
USER_UPDATE: UserUpdateEvent
|
|
5396
|
+
VOICE_STATE_UPDATE: VoiceStateUpdateEvent
|
|
5397
|
+
VOICE_SERVER_UPDATE: VoiceServerUpdateEvent
|
|
5398
|
+
WEBHOOKS_UPDATE: WebhooksUpdateEvent
|
|
5399
|
+
}
|
|
4749
5400
|
export type ReconnectEvent = null
|
|
4750
5401
|
export interface RequestGuildMember {
|
|
4751
|
-
/**
|
|
5402
|
+
/** ID of the guild to get members for */
|
|
4752
5403
|
guild_id: Snowflake
|
|
4753
5404
|
/** string that username starts with, or an empty string to return all members */
|
|
4754
5405
|
query?: string
|
|
@@ -4775,8 +5426,18 @@ export interface ResolvedDatum {
|
|
|
4775
5426
|
/** the ids and attachment objects */
|
|
4776
5427
|
attachments?: Record<Snowflake, Attachment>
|
|
4777
5428
|
}
|
|
5429
|
+
export interface Response {
|
|
5430
|
+
/** the current application */
|
|
5431
|
+
application: Application
|
|
5432
|
+
/** the scopes the user has authorized the application for */
|
|
5433
|
+
scopes: string[]
|
|
5434
|
+
/** when the access token expires */
|
|
5435
|
+
expires: string
|
|
5436
|
+
/** the user who has authorized, if the user has authorized with the identify scope */
|
|
5437
|
+
user?: User
|
|
5438
|
+
}
|
|
4778
5439
|
export interface ResponseBody {
|
|
4779
|
-
/** the
|
|
5440
|
+
/** the public, archived threads */
|
|
4780
5441
|
threads: Channel[]
|
|
4781
5442
|
/** a thread member object for each returned thread the current user has joined */
|
|
4782
5443
|
members: ThreadMember[]
|
|
@@ -4784,11 +5445,11 @@ export interface ResponseBody {
|
|
|
4784
5445
|
has_more: boolean
|
|
4785
5446
|
}
|
|
4786
5447
|
export interface Resume {
|
|
4787
|
-
/**
|
|
5448
|
+
/** Session token */
|
|
4788
5449
|
token: string
|
|
4789
|
-
/**
|
|
5450
|
+
/** Session ID */
|
|
4790
5451
|
session_id: string
|
|
4791
|
-
/**
|
|
5452
|
+
/** Last sequence number received */
|
|
4792
5453
|
seq: number
|
|
4793
5454
|
}
|
|
4794
5455
|
export type ResumedEvent = null
|
|
@@ -4837,44 +5498,67 @@ export interface SearchGuildMemberParams {
|
|
|
4837
5498
|
limit: number
|
|
4838
5499
|
}
|
|
4839
5500
|
export interface SelectMenu {
|
|
4840
|
-
/**
|
|
4841
|
-
type:
|
|
4842
|
-
/**
|
|
5501
|
+
/** Type of select menu component (text: 3, user: 5, role: 6, mentionable: 7, channels: 8) */
|
|
5502
|
+
type: ComponentType
|
|
5503
|
+
/** ID for the select menu; max 100 characters */
|
|
4843
5504
|
custom_id: string
|
|
4844
|
-
/**
|
|
4845
|
-
options
|
|
4846
|
-
/**
|
|
5505
|
+
/** Specified choices in a select menu (only required and available for string selects (type 3); max 25 */
|
|
5506
|
+
options?: SelectOption[]
|
|
5507
|
+
/** List of channel types to include in the channel select component (type 8) */
|
|
5508
|
+
channel_types?: ChannelType[]
|
|
5509
|
+
/** Placeholder text if nothing is selected; max 150 characters */
|
|
4847
5510
|
placeholder?: string
|
|
4848
|
-
/**
|
|
5511
|
+
/** Minimum number of items that must be chosen (defaults to 1); min 0, max 25 */
|
|
4849
5512
|
min_values?: number
|
|
4850
|
-
/**
|
|
5513
|
+
/** Maximum number of items that can be chosen (defaults to 1); max 25 */
|
|
4851
5514
|
max_values?: number
|
|
4852
|
-
/**
|
|
5515
|
+
/** Whether select menu is disabled (defaults to false) */
|
|
4853
5516
|
disabled?: boolean
|
|
4854
5517
|
}
|
|
4855
5518
|
export interface SelectOption {
|
|
4856
|
-
/**
|
|
5519
|
+
/** User-facing name of the option; max 100 characters */
|
|
4857
5520
|
label: string
|
|
4858
|
-
/**
|
|
5521
|
+
/** Dev-defined value of the option; max 100 characters */
|
|
4859
5522
|
value: string
|
|
4860
|
-
/**
|
|
5523
|
+
/** Additional description of the option; max 100 characters */
|
|
4861
5524
|
description?: string
|
|
4862
5525
|
/** id, name, and animated */
|
|
4863
5526
|
emoji?: Emoji
|
|
4864
|
-
/**
|
|
5527
|
+
/** Will show this option as selected by default */
|
|
4865
5528
|
default?: boolean
|
|
4866
5529
|
}
|
|
5530
|
+
export type SendEvent =
|
|
5531
|
+
| Identify
|
|
5532
|
+
| Resume
|
|
5533
|
+
| Heartbeat
|
|
5534
|
+
| RequestGuildMember
|
|
5535
|
+
| UpdateVoiceState
|
|
5536
|
+
| UpdatePresence
|
|
5537
|
+
export interface SendEvents {
|
|
5538
|
+
IDENTIFY: Identify
|
|
5539
|
+
RESUME: Resume
|
|
5540
|
+
HEARTBEAT: Heartbeat
|
|
5541
|
+
REQUEST_GUILD_MEMBERS: RequestGuildMember
|
|
5542
|
+
UPDATE_VOICE_STATE: UpdateVoiceState
|
|
5543
|
+
UPDATE_PRESENCE: UpdatePresence
|
|
5544
|
+
}
|
|
4867
5545
|
export interface SessionStartLimit {
|
|
4868
|
-
/**
|
|
5546
|
+
/** Total number of session starts the current user is allowed */
|
|
4869
5547
|
total: number
|
|
4870
|
-
/**
|
|
5548
|
+
/** Remaining number of session starts the current user is allowed */
|
|
4871
5549
|
remaining: number
|
|
4872
|
-
/**
|
|
5550
|
+
/** Number of milliseconds after which the limit resets */
|
|
4873
5551
|
reset_after: number
|
|
4874
|
-
/**
|
|
5552
|
+
/** Number of identify requests allowed per 5 seconds */
|
|
4875
5553
|
max_concurrency: number
|
|
4876
5554
|
}
|
|
4877
5555
|
export type Snowflake = `${bigint}`
|
|
5556
|
+
export enum SortOrderType {
|
|
5557
|
+
/** Sort forum posts by activity */
|
|
5558
|
+
LATEST_ACTIVITY = 0,
|
|
5559
|
+
/** Sort forum posts by creation time (from most recent to oldest) */
|
|
5560
|
+
CREATION_DATE = 1,
|
|
5561
|
+
}
|
|
4878
5562
|
export interface StageInstance {
|
|
4879
5563
|
/** The id of this Stage instance */
|
|
4880
5564
|
id: Snowflake
|
|
@@ -4894,18 +5578,50 @@ export interface StageInstance {
|
|
|
4894
5578
|
export type StageInstanceCreateEvent = StageInstance
|
|
4895
5579
|
export type StageInstanceDeleteEvent = StageInstance
|
|
4896
5580
|
export type StageInstanceUpdateEvent = StageInstance
|
|
4897
|
-
export interface
|
|
5581
|
+
export interface StartThreadFromMessageParams {
|
|
5582
|
+
/** 1-100 character channel name */
|
|
5583
|
+
name: string
|
|
5584
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
5585
|
+
auto_archive_duration?: number
|
|
5586
|
+
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
5587
|
+
rate_limit_per_user?: number | null
|
|
5588
|
+
}
|
|
5589
|
+
export interface StartThreadInForumChannelForumThreadMessageParams {
|
|
5590
|
+
/** Message contents (up to 2000 characters) */
|
|
5591
|
+
content?: string
|
|
5592
|
+
/** Embedded rich content (up to 6000 characters) */
|
|
5593
|
+
embeds?: Embed[]
|
|
5594
|
+
/** Allowed mentions for the message */
|
|
5595
|
+
allowed_mentions?: AllowedMention
|
|
5596
|
+
/** Components to include with the message */
|
|
5597
|
+
components?: Component[]
|
|
5598
|
+
/** IDs of up to 3 stickers in the server to send in the message */
|
|
5599
|
+
sticker_ids?: Snowflake[]
|
|
5600
|
+
/** Contents of the file being sent. See Uploading Files */
|
|
5601
|
+
files: string
|
|
5602
|
+
/** JSON-encoded body of non-file params, only for multipart/form-data requests. See Uploading Files */
|
|
5603
|
+
payload_json?: string
|
|
5604
|
+
/** Attachment objects with filename and description. See Uploading Files */
|
|
5605
|
+
attachments?: Attachment[]
|
|
5606
|
+
/** Message flags combined as a bitfield (only SUPPRESS_EMBEDS can be set) */
|
|
5607
|
+
flags?: number
|
|
5608
|
+
}
|
|
5609
|
+
export interface StartThreadInForumChannelParams {
|
|
4898
5610
|
/** 1-100 character channel name */
|
|
4899
5611
|
name: string
|
|
4900
5612
|
/** duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */
|
|
4901
5613
|
auto_archive_duration?: number
|
|
4902
5614
|
/** amount of seconds a user has to wait before sending another message (0-21600) */
|
|
4903
5615
|
rate_limit_per_user?: number | null
|
|
5616
|
+
/** contents of the first message in the forum thread */
|
|
5617
|
+
message: StartThreadInForumChannelForumThreadMessageParams
|
|
5618
|
+
/** the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM channel */
|
|
5619
|
+
applied_tags?: Snowflake[]
|
|
4904
5620
|
}
|
|
4905
5621
|
export interface StartThreadWithoutMessageParams {
|
|
4906
5622
|
/** 1-100 character channel name */
|
|
4907
5623
|
name: string
|
|
4908
|
-
/**
|
|
5624
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
4909
5625
|
auto_archive_duration?: number
|
|
4910
5626
|
/** the type of thread to create */
|
|
4911
5627
|
type?: ChannelType
|
|
@@ -4984,7 +5700,7 @@ export interface StickerPack {
|
|
|
4984
5700
|
export enum StickerType {
|
|
4985
5701
|
/** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
|
|
4986
5702
|
STANDARD = 1,
|
|
4987
|
-
/** a sticker uploaded to a
|
|
5703
|
+
/** a sticker uploaded to a guild for the guild's members */
|
|
4988
5704
|
GUILD = 2,
|
|
4989
5705
|
}
|
|
4990
5706
|
export const SystemChannelFlag = {
|
|
@@ -5022,39 +5738,39 @@ export interface TeamMember {
|
|
|
5022
5738
|
export interface TextInput {
|
|
5023
5739
|
/** 4 for a text input */
|
|
5024
5740
|
type: number
|
|
5025
|
-
/**
|
|
5741
|
+
/** Developer-defined identifier for the input; max 100 characters */
|
|
5026
5742
|
custom_id: string
|
|
5027
|
-
/**
|
|
5743
|
+
/** The Text Input Style */
|
|
5028
5744
|
style: TextInputStyle
|
|
5029
|
-
/**
|
|
5745
|
+
/** Label for this component; max 45 characters */
|
|
5030
5746
|
label: string
|
|
5031
|
-
/**
|
|
5747
|
+
/** Minimum input length for a text input; min 0, max 4000 */
|
|
5032
5748
|
min_length?: number
|
|
5033
|
-
/**
|
|
5749
|
+
/** Maximum input length for a text input; min 1, max 4000 */
|
|
5034
5750
|
max_length?: number
|
|
5035
|
-
/**
|
|
5751
|
+
/** Whether this component is required to be filled (defaults to true) */
|
|
5036
5752
|
required?: boolean
|
|
5037
|
-
/**
|
|
5753
|
+
/** Pre-filled value for this component; max 4000 characters */
|
|
5038
5754
|
value?: string
|
|
5039
|
-
/**
|
|
5755
|
+
/** Custom placeholder text if the input is empty; max 100 characters */
|
|
5040
5756
|
placeholder?: string
|
|
5041
5757
|
}
|
|
5042
5758
|
export enum TextInputStyle {
|
|
5043
|
-
/**
|
|
5759
|
+
/** Single-line input */
|
|
5044
5760
|
SHORT = 1,
|
|
5045
|
-
/**
|
|
5761
|
+
/** Multi-line input */
|
|
5046
5762
|
PARAGRAPH = 2,
|
|
5047
5763
|
}
|
|
5048
5764
|
export type ThreadCreateEvent = Channel
|
|
5049
5765
|
export type ThreadDeleteEvent = Channel
|
|
5050
5766
|
export interface ThreadListSyncEvent {
|
|
5051
|
-
/**
|
|
5767
|
+
/** ID of the guild */
|
|
5052
5768
|
guild_id: Snowflake
|
|
5053
|
-
/**
|
|
5769
|
+
/** Parent channel IDs whose threads are being synced. If omitted, then threads were synced for the entire guild. This array may contain channel_ids that have no active threads as well, so you know to clear that data. */
|
|
5054
5770
|
channel_ids?: Snowflake[]
|
|
5055
|
-
/**
|
|
5771
|
+
/** All active threads in the given channels that the current user can access */
|
|
5056
5772
|
threads: Channel[]
|
|
5057
|
-
/**
|
|
5773
|
+
/** All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to */
|
|
5058
5774
|
members: ThreadMember[]
|
|
5059
5775
|
}
|
|
5060
5776
|
export interface ThreadMember {
|
|
@@ -5068,26 +5784,26 @@ export interface ThreadMember {
|
|
|
5068
5784
|
flags: number
|
|
5069
5785
|
}
|
|
5070
5786
|
export interface ThreadMembersUpdateEvent {
|
|
5071
|
-
/**
|
|
5787
|
+
/** ID of the thread */
|
|
5072
5788
|
id: Snowflake
|
|
5073
|
-
/**
|
|
5789
|
+
/** ID of the guild */
|
|
5074
5790
|
guild_id: Snowflake
|
|
5075
|
-
/**
|
|
5791
|
+
/** Approximate number of members in the thread, capped at 50 */
|
|
5076
5792
|
member_count: number
|
|
5077
|
-
/**
|
|
5793
|
+
/** Users who were added to the thread */
|
|
5078
5794
|
added_members?: ThreadMember[]
|
|
5079
|
-
/**
|
|
5795
|
+
/** ID of the users who were removed from the thread */
|
|
5080
5796
|
removed_member_ids?: Snowflake[]
|
|
5081
5797
|
}
|
|
5082
5798
|
export type ThreadMemberUpdateEvent = ThreadMember
|
|
5083
5799
|
export interface ThreadMemberUpdateEventExtra {
|
|
5084
|
-
/**
|
|
5800
|
+
/** ID of the guild */
|
|
5085
5801
|
guild_id: Snowflake
|
|
5086
5802
|
}
|
|
5087
5803
|
export interface ThreadMetadatum {
|
|
5088
5804
|
/** whether the thread is archived */
|
|
5089
5805
|
archived: boolean
|
|
5090
|
-
/**
|
|
5806
|
+
/** the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080 */
|
|
5091
5807
|
auto_archive_duration: number
|
|
5092
5808
|
/** timestamp when the thread's archive status was last changed, used for calculating recent activity */
|
|
5093
5809
|
archive_timestamp: string
|
|
@@ -5099,16 +5815,38 @@ export interface ThreadMetadatum {
|
|
|
5099
5815
|
create_timestamp?: string | null
|
|
5100
5816
|
}
|
|
5101
5817
|
export type ThreadUpdateEvent = Channel
|
|
5818
|
+
export interface TriggerMetadatum {
|
|
5819
|
+
/** KEYWORD */
|
|
5820
|
+
keyword_filter: string[]
|
|
5821
|
+
/** KEYWORD */
|
|
5822
|
+
regex_patterns: string[]
|
|
5823
|
+
/** KEYWORD_PRESET */
|
|
5824
|
+
presets: KeywordPresetType[]
|
|
5825
|
+
/** KEYWORD, KEYWORD_PRESET */
|
|
5826
|
+
allow_list: string[]
|
|
5827
|
+
/** MENTION_SPAM */
|
|
5828
|
+
mention_total_limit: number
|
|
5829
|
+
}
|
|
5830
|
+
export enum TriggerType {
|
|
5831
|
+
/** check if content contains words from a user defined list of keywords */
|
|
5832
|
+
KEYWORD = 1,
|
|
5833
|
+
/** check if content represents generic spam */
|
|
5834
|
+
SPAM = 3,
|
|
5835
|
+
/** check if content contains words from internal pre-defined wordsets */
|
|
5836
|
+
KEYWORD_PRESET = 4,
|
|
5837
|
+
/** check if content contains more unique mentions than allowed */
|
|
5838
|
+
MENTION_SPAM = 5,
|
|
5839
|
+
}
|
|
5102
5840
|
export interface TypingStartEvent {
|
|
5103
|
-
/**
|
|
5841
|
+
/** ID of the channel */
|
|
5104
5842
|
channel_id: Snowflake
|
|
5105
|
-
/**
|
|
5843
|
+
/** ID of the guild */
|
|
5106
5844
|
guild_id?: Snowflake
|
|
5107
|
-
/**
|
|
5845
|
+
/** ID of the user */
|
|
5108
5846
|
user_id: Snowflake
|
|
5109
|
-
/**
|
|
5847
|
+
/** Unix time (in seconds) of when the user started typing */
|
|
5110
5848
|
timestamp: number
|
|
5111
|
-
/**
|
|
5849
|
+
/** Member who started typing if this happened in a guild */
|
|
5112
5850
|
member?: GuildMember
|
|
5113
5851
|
}
|
|
5114
5852
|
export interface UnavailableGuild {
|
|
@@ -5118,23 +5856,23 @@ export interface UnavailableGuild {
|
|
|
5118
5856
|
unavailable: boolean
|
|
5119
5857
|
}
|
|
5120
5858
|
export interface UpdatePresence {
|
|
5121
|
-
/**
|
|
5859
|
+
/** Unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
|
|
5122
5860
|
since?: number | null
|
|
5123
|
-
/**
|
|
5861
|
+
/** User's activities */
|
|
5124
5862
|
activities: Activity[]
|
|
5125
|
-
/**
|
|
5863
|
+
/** User's new status */
|
|
5126
5864
|
status: StatusType
|
|
5127
|
-
/**
|
|
5865
|
+
/** Whether or not the client is afk */
|
|
5128
5866
|
afk: boolean
|
|
5129
5867
|
}
|
|
5130
5868
|
export interface UpdateVoiceState {
|
|
5131
|
-
/**
|
|
5869
|
+
/** ID of the guild */
|
|
5132
5870
|
guild_id: Snowflake
|
|
5133
|
-
/**
|
|
5871
|
+
/** ID of the voice channel client wants to join (null if disconnecting) */
|
|
5134
5872
|
channel_id?: Snowflake | null
|
|
5135
|
-
/**
|
|
5873
|
+
/** Whether the client is muted */
|
|
5136
5874
|
self_mute: boolean
|
|
5137
|
-
/**
|
|
5875
|
+
/** Whether the client deafened */
|
|
5138
5876
|
self_deaf: boolean
|
|
5139
5877
|
}
|
|
5140
5878
|
export interface User {
|
|
@@ -5174,7 +5912,7 @@ export const UserFlag = {
|
|
|
5174
5912
|
STAFF: 1 << 0,
|
|
5175
5913
|
/** Partnered Server Owner */
|
|
5176
5914
|
PARTNER: 1 << 1,
|
|
5177
|
-
/** HypeSquad Events
|
|
5915
|
+
/** HypeSquad Events Member */
|
|
5178
5916
|
HYPESQUAD: 1 << 2,
|
|
5179
5917
|
/** Bug Hunter Level 1 */
|
|
5180
5918
|
BUG_HUNTER_LEVEL_1: 1 << 3,
|
|
@@ -5198,6 +5936,8 @@ export const UserFlag = {
|
|
|
5198
5936
|
CERTIFIED_MODERATOR: 1 << 18,
|
|
5199
5937
|
/** Bot uses only HTTP interactions and is shown in the online member list */
|
|
5200
5938
|
BOT_HTTP_INTERACTIONS: 1 << 19,
|
|
5939
|
+
/** User is an Active Developer */
|
|
5940
|
+
ACTIVE_DEVELOPER: 1 << 22,
|
|
5201
5941
|
} as const
|
|
5202
5942
|
export type UserUpdateEvent = User
|
|
5203
5943
|
export enum VerificationLevel {
|
|
@@ -5261,11 +6001,11 @@ export interface VoiceRegion {
|
|
|
5261
6001
|
custom: boolean
|
|
5262
6002
|
}
|
|
5263
6003
|
export interface VoiceServerUpdateEvent {
|
|
5264
|
-
/**
|
|
6004
|
+
/** Voice connection token */
|
|
5265
6005
|
token: string
|
|
5266
|
-
/**
|
|
6006
|
+
/** Guild this voice server update is for */
|
|
5267
6007
|
guild_id: Snowflake
|
|
5268
|
-
/**
|
|
6008
|
+
/** Voice server host */
|
|
5269
6009
|
endpoint?: string | null
|
|
5270
6010
|
}
|
|
5271
6011
|
export interface VoiceState {
|
|
@@ -5291,7 +6031,7 @@ export interface VoiceState {
|
|
|
5291
6031
|
self_stream?: boolean
|
|
5292
6032
|
/** whether this user's camera is enabled */
|
|
5293
6033
|
self_video: boolean
|
|
5294
|
-
/** whether this user
|
|
6034
|
+
/** whether this user's permission to speak is denied */
|
|
5295
6035
|
suppress: boolean
|
|
5296
6036
|
/** the time at which the user requested to speak */
|
|
5297
6037
|
request_to_speak_timestamp?: string | null
|
|
@@ -5324,9 +6064,9 @@ export interface Webhook {
|
|
|
5324
6064
|
url?: string
|
|
5325
6065
|
}
|
|
5326
6066
|
export interface WebhooksUpdateEvent {
|
|
5327
|
-
/**
|
|
6067
|
+
/** ID of the guild */
|
|
5328
6068
|
guild_id: Snowflake
|
|
5329
|
-
/**
|
|
6069
|
+
/** ID of the channel */
|
|
5330
6070
|
channel_id: Snowflake
|
|
5331
6071
|
}
|
|
5332
6072
|
export enum WebhookType {
|