UNPKG

@evolvejs/core

Version:

An advanced Discord API wrapper with TS and JS support

147 lines (146 loc) 5.02 kB
import { ITextChannel, IDMChannel, IVoiceChannel, IGroupChannel, ICategoryChannel, INewsChannel, IStoreChannel, Payload } from ".."; import { TextChannel } from "../Structures/Channel/TextChannel"; import { VoiceChannel } from "../Structures/Channel/VoiceChannel"; import { DMChannel } from "../Structures/Channel/DMChannel"; import { CategoryChannel } from "../Structures/Channel/CategoryChannel"; import { GroupChannel } from "../Structures/Channel/GroupChannel"; import { NewsChannel } from "../Structures/Channel/NewsChannel"; import { StoreChannel } from "../Structures/Channel/StoreChannel"; export declare enum CONSTANTS { Gateway = "wss://gateway.discord.gg/?v=8&encoding=", Api = "https://discord.com/api/v8", API_ERROR = "API_ERROR", EVENTS = "EVENTS" } export declare enum CHANNELTYPES { Text = 0, Direct = 1, Voice = 2, Group = 3, Category = 4, News = 5, Store = 6 } export declare enum ACTIVITY { Game = 0, Stream = 1, Listening = 2, Custom = 3 } export declare const NITRO: { 0: string; 1: string; 2: string; }; export declare enum WEBHOOKTYPE { Incoming = 1, Channel_Follower = 2 } export declare type Visibility = "idle" | "dnd" | "online" | "offline"; export declare type ChannelResolvable = ITextChannel | IDMChannel | IVoiceChannel | IGroupChannel | ICategoryChannel | INewsChannel | IStoreChannel; export declare type ChannelTypes = TextChannel | VoiceChannel | DMChannel | CategoryChannel | GroupChannel | NewsChannel | StoreChannel; export declare const ChannelResolver: (typeof TextChannel | typeof DMChannel | typeof VoiceChannel | typeof GroupChannel | typeof CategoryChannel | typeof NewsChannel | typeof StoreChannel)[]; export declare enum ActivityTypes { PLAYING = 0, STREAMING = 1, LISTENING = 2, CUSTOM = 4 } export declare enum CacheOptions { GUILD = 0, CHANNELS = 1, USERS = 2, MESSAGES = 3, EMOJI = 4, ALL = 5 } export declare type Events = "rawEvent" | "packetReady" | "clientReady" | "resumed" | "reconnect" | "invalidSession" | "newChannel" | "channelUpdate" | "removeChannel" | "channelPinsUpdate" | "addedGuild" | "guildUpdate" | "removeGuild" | "voiceStateUpdate" | "voiceServerUpdate" | "newMessage"; export declare enum EVENTS { RAW = "rawEvent", PACKET_READY = "packetReady", HELLO = "hello", READY = "clientReady", RESUMED = "resumed", RECONNECT = "reconnect", INVALID_SESSION = "invalidSession", CHANNEL_CREATE = "newChannel", CHANNEL_UPDATE = "channelUpdate", CHANNEL_DELETE = "removeChannel", CHANNEL_PINS_UPDATE = "channelPinsUpdate", GUILD_CREATE = "addedGuild", GUILD_UPDATE = "guildUpdate", GUILD_DELETE = "removeGuild", GUILD_BAN_ADD = "userBanned", GUILD_BAN_REMOVE = "userUnbanned", GUILD_EMOJIS_UPDATE = "guildEmojisUpdate", GUILD_INTEGRATIONS_UPDATE = "guildIntegrationsUpdate", GUILD_MEMBER_ADD = "memberJoined", GUILD_MEMBER_REMOVE = "memberLeft", GUILD_MEMBER_UPDATE = "memberUpdate", GUILD_MEMBERS_CHUNK = "memberChunk", GUILD_ROLE_CREATE = "newRole", GUILD_ROLE_UPDATE = "roleUpdated", GUILD_ROLE_DELETE = "removeRole", INVITE_CREATE = "addInvite", INVITE_DELETE = "removeInvite", MESSAGE_CREATE = "newMessage", MESSAGE_UPDATE = "updateMessage", MESSAGE_DELETE = "removeMessage", MESSAGE_DELETE_BULK = "bulkMessageRemove", MESSAGE_REACTION_ADD = "reactionAdd", MESSAGE_REACTION_REMOVE = "reactionRemove", MESSAGE_REACTION_REMOVE_All = "reactionRemoveAll", MESSAGE_REACTION_REMOVE_EMOJI = "removeReactionEmoji", PRESENCE_UPDATE = "userPresenceUpdate", TYPING_START = "typing", USER_UPDATE = "userUpdate", VOICE_STATE_UPDATE = "voiceStateUpdate", VOICE_SERVER_UPDATE = "voiceServerUpdate", WEBHOOKS_UPDATE = "webhookUpdate", SHARD_SPAWN = "shardSpawn", SHARD_DESTROY = "shardDestroy", API_ERROR = "restError" } export declare enum GatewayIntents { GUILD = 1, GUILD_MEMBERS = 2, GUILD_BANS = 4, GUILD_EMOJIS = 8, GUILD_INTEGRATIONS = 16, GUILD_WEBHOOKS = 32, GUILD_INVITES = 64, GUILD_VOICE_STATES = 128, GUILD_PRESENCES = 256, GUILD_MESSAGES = 512, GUILD_MESSAGES_REACTIONS = 1024, GUILD_MESSAGE_TYPING = 2048, DIRECT_MESSAGES = 4096, DIRECT_MESSAGES_REACTIONS = 8192, DIRECT_MESSAGES_TYPING = 16384, ALL = 32767 } export declare enum OPCODE { Dispatch = 0, Heartbeat = 1, Identify = 2, Presence_Update = 3, Voice_State_Update = 4, Resume = 6, Reconnect = 7, Request = 8, Invalid = 9, Hello = 10, Heartbeat_ACK = 11 } export declare const Heartbeat: Payload; export declare const VoiceStateUpdate: Payload; export declare const VoiceIdentify: Payload; export declare const Identify: Payload; export interface TokenAccessOptions { code: string; redirectUri: string; scopes: string; } export declare enum PERMISSIONS { ADMINISTRATOR = "" }