mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Merge branch 'master' of https://github.com/Skillz4Killz/Discordeno
This commit is contained in:
+2
-2
@@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
/* Module Resolution Options */
|
/* Module Resolution Options */
|
||||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
// Hack to stop VSCode from suggesting imports without ./ or ../ as a prefix.
|
||||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
"baseUrl": "../../", /* Base directory to resolve non-absolute module names. */
|
||||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||||
// "types": [], /* Type declaration files to be included in compilation. */
|
// "types": [], /* Type declaration files to be included in compilation. */
|
||||||
|
|||||||
@@ -28,3 +28,129 @@ export interface DiscordBotGateway {
|
|||||||
export interface DiscordHeartbeatPayload {
|
export interface DiscordHeartbeatPayload {
|
||||||
heartbeat_interval: number
|
heartbeat_interval: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum GatewayOpcode {
|
||||||
|
Dispatch = 0,
|
||||||
|
Heartbeat,
|
||||||
|
Identify,
|
||||||
|
StatusUpdate,
|
||||||
|
VoiceStateUpdate,
|
||||||
|
Resume,
|
||||||
|
Reconnect,
|
||||||
|
RequestGuildMembers,
|
||||||
|
InvalidSession,
|
||||||
|
Hello,
|
||||||
|
HeartbeatACK
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum GatewayCloseEventCode {
|
||||||
|
UnknownError = 4000,
|
||||||
|
UnknownOpcode,
|
||||||
|
DecodeError,
|
||||||
|
NotAuthenticated,
|
||||||
|
AuthenticationFailed,
|
||||||
|
AlreadyAuthenticated,
|
||||||
|
InvalidSeq = 4007,
|
||||||
|
RateLimited,
|
||||||
|
SessionTimeout,
|
||||||
|
InvalidShard,
|
||||||
|
ShardingRequired
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum VoiceOpcode {
|
||||||
|
Identify,
|
||||||
|
SelectProtocol,
|
||||||
|
Ready,
|
||||||
|
Heartbeat,
|
||||||
|
SessionDescription,
|
||||||
|
Speaking,
|
||||||
|
HeartbeatACK,
|
||||||
|
Resume,
|
||||||
|
Hello,
|
||||||
|
Resumed,
|
||||||
|
ClientDisconnect = 13
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum VoiceCloseEventCode {
|
||||||
|
UnknownOpcode = 4001,
|
||||||
|
NotAuthenticated = 4003,
|
||||||
|
AuthenticationFailed,
|
||||||
|
AlreadyAuthenticated,
|
||||||
|
SessionNoLongerValid,
|
||||||
|
SessionTimeout = 4009,
|
||||||
|
ServerNotFound = 4011,
|
||||||
|
UnknownProtocol,
|
||||||
|
Disconnected = 4014,
|
||||||
|
VoiceServerCrashed,
|
||||||
|
UnknownEncryptionMode
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum HttpResponseCode {
|
||||||
|
Ok = 200,
|
||||||
|
Created,
|
||||||
|
NoContent = 204,
|
||||||
|
NotModified = 304,
|
||||||
|
BadRequest = 400,
|
||||||
|
Unauthorized = 401,
|
||||||
|
Forbidden = 403,
|
||||||
|
NotFound,
|
||||||
|
MethodNotAllowed,
|
||||||
|
TooManyRequests = 429,
|
||||||
|
GatewayUnavailable = 502,
|
||||||
|
// ServerError left untyped because it's 5xx.
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum JSONErrorCode {
|
||||||
|
UnknownAccount = 10001,
|
||||||
|
UnknownApplication,
|
||||||
|
UnknownChannel,
|
||||||
|
UnknownGuild,
|
||||||
|
UnknownIntegration,
|
||||||
|
UnknownInvite,
|
||||||
|
UnknownMember,
|
||||||
|
UnknownMessge,
|
||||||
|
UnknownOverwrite,
|
||||||
|
UnknownProvider,
|
||||||
|
UnknownRole,
|
||||||
|
UnknownToken = 10012,
|
||||||
|
UnknownUser,
|
||||||
|
UnknownEmoji,
|
||||||
|
UnknownWebhook,
|
||||||
|
BotsCannotUse = 20001,
|
||||||
|
OnlyBotsCanUse,
|
||||||
|
MaxGuildsReached = 30001,
|
||||||
|
MaxFriendsReached,
|
||||||
|
MaxPinsReached,
|
||||||
|
MaxGuildRolesReached = 30005,
|
||||||
|
MaxReactionsReached = 30010,
|
||||||
|
MaxGuildChannelsReached = 30013,
|
||||||
|
MaxInvitesReached = 30016,
|
||||||
|
Unathorized = 40001,
|
||||||
|
UserIsBannedFromGuild = 40007,
|
||||||
|
MissingAccess = 50001,
|
||||||
|
InvalidAccountType = 50002,
|
||||||
|
CannotExecuteOnDMChannel,
|
||||||
|
WidgetDisabled,
|
||||||
|
CannotEditMessageByAnotherUser,
|
||||||
|
CannotSendEmptyMessage,
|
||||||
|
CannotSendMessageToUser,
|
||||||
|
CannotSendMessageInVoiceChannel,
|
||||||
|
ChannelVerificationTooHigh,
|
||||||
|
OAuth2ApplicationNoBot,
|
||||||
|
OAuth2ApplicationLimitReached,
|
||||||
|
InvalidOAuthState,
|
||||||
|
MissingPermissions,
|
||||||
|
InvalidAuthenticationToken,
|
||||||
|
NoteIsTooLong,
|
||||||
|
TooFewOrTooManyMessagesToDelete,
|
||||||
|
MessageCanOnlyBePinnedInParentChannel = 50019,
|
||||||
|
InviteCodeTakenOrInvalid,
|
||||||
|
CannotExecuteOnSystemMessage,
|
||||||
|
InvalidOAuth2AccessToken,
|
||||||
|
MessageProvidedTooOldToBulkDelet = 50034,
|
||||||
|
InvalidFormBody,
|
||||||
|
InviteAcceptedToGuildApplicationBotNotIn,
|
||||||
|
InvalidAPIVersion = 50041,
|
||||||
|
ReactionBlocked = 90001,
|
||||||
|
ResourceOverloaded = 130000
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user