Skip to content

Commit 1b39a77

Browse files
committed
initial commit
1 parent 8fe9c07 commit 1b39a77

File tree

2 files changed

+729
-1
lines changed

2 files changed

+729
-1
lines changed

Diff for: rpc/common.ts

+93-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
1+
/**
2+
* @unstable
3+
*/
4+
export enum LobbyType {
5+
Private = 1,
6+
Public,
7+
}
8+
9+
/**
10+
* @unstable
11+
*/
12+
export enum RelationshipType {
13+
None,
14+
Friend,
15+
Blocked,
16+
PendingIncoming,
17+
PendingOutgoing,
18+
Implicit,
19+
}
20+
121
/**
222
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes
323
*/
424
export enum RPCErrorCodes {
525
UnknownError = 1_000,
26+
/**
27+
* @unstable
28+
*/
29+
ServiceUnavailable,
30+
/**
31+
* @unstable
32+
*/
33+
TransactionAborted,
634
InvalidPayload = 4_000,
735
InvalidCommand = 4_002,
836
InvalidGuild,
@@ -13,21 +41,85 @@ export enum RPCErrorCodes {
1341
InvalidOrigin,
1442
InvalidToken,
1543
InvalidUser,
44+
/**
45+
* @unstable
46+
*/
47+
InvalidInvite,
48+
/**
49+
* @unstable
50+
*/
51+
InvalidActivityJoinRequest,
52+
/**
53+
* @unstable
54+
*/
55+
InvalidLobby,
56+
/**
57+
* @unstable
58+
*/
59+
InvalidLobbySecret,
60+
/**
61+
* @unstable
62+
*/
63+
InvalidEntitlement,
64+
/**
65+
* @unstable
66+
*/
67+
InvalidGiftCode,
1668
OAuth2Error = 5_000,
1769
SelectChannelTimedOut,
1870
GetGuildTimedOut,
1971
SelectVoiceForceRequired,
2072
CaptureShortcutAlreadyListening,
73+
/**
74+
* @unstable
75+
*/
76+
InvalidActivitySecret,
77+
/**
78+
* @unstable
79+
*/
80+
NoEligibleActivity,
81+
/**
82+
* @unstable
83+
*/
84+
LobbyFull,
85+
/**
86+
* @unstable
87+
*/
88+
PurchaseCanceled,
89+
/**
90+
* @unstable
91+
*/
92+
PurchaseError,
93+
/**
94+
* @unstable
95+
*/
96+
UnauthorizedForAchievement,
97+
/**
98+
* @unstable
99+
*/
100+
RateLimited,
21101
}
22102

23103
/**
24104
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-close-event-codes
25105
*/
26106
export enum RPCCloseEventCodes {
107+
/**
108+
* @unstable
109+
*/
110+
CloseNormal = 1_000,
111+
/**
112+
* @unstable
113+
*/
114+
CloseUnsupported = 1_003,
115+
/**
116+
* @unstable
117+
*/
118+
CloseAbnormal = 1_006,
27119
InvalidClientId = 4_000,
28120
InvalidOrigin,
29121
RateLimited,
30122
TokenRevoked,
31123
InvalidVersion,
32124
InvalidEncoding,
33-
}
125+
}

0 commit comments

Comments
 (0)