commit
f434d995b7
37 changed files with 53 additions and 53 deletions
|
@ -1,5 +1,5 @@
|
||||||
import { GatewayEventHandler } from '../index.ts'
|
import { GatewayEventHandler } from '../index.ts'
|
||||||
import { GatewayEvents } from '../../types/gatewayTypes.ts'
|
import { GatewayEvents } from '../../types/gateway.ts'
|
||||||
import { channelCreate } from './channelCreate.ts'
|
import { channelCreate } from './channelCreate.ts'
|
||||||
import { channelDelete } from './channelDelete.ts'
|
import { channelDelete } from './channelDelete.ts'
|
||||||
import { channelUpdate } from './channelUpdate.ts'
|
import { channelUpdate } from './channelUpdate.ts'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Guild } from '../../structures/guild.ts'
|
import { Guild } from '../../structures/guild.ts'
|
||||||
import { User } from '../../structures/user.ts'
|
import { User } from '../../structures/user.ts'
|
||||||
import { GuildPayload } from '../../types/guildTypes.ts'
|
import { GuildPayload } from '../../types/guild.ts'
|
||||||
import { Gateway, GatewayEventHandler } from '../index.ts'
|
import { Gateway, GatewayEventHandler } from '../index.ts'
|
||||||
|
|
||||||
export const ready: GatewayEventHandler = (gateway: Gateway, d: any) => {
|
export const ready: GatewayEventHandler = (gateway: Gateway, d: any) => {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {
|
||||||
DISCORD_API_VERSION
|
DISCORD_API_VERSION
|
||||||
} from '../consts/urlsAndVersions.ts'
|
} from '../consts/urlsAndVersions.ts'
|
||||||
import { GatewayResponse } from '../types/gatewayResponse.ts'
|
import { GatewayResponse } from '../types/gatewayResponse.ts'
|
||||||
import { GatewayOpcodes, GatewayIntents } from '../types/gatewayTypes.ts'
|
import { GatewayOpcodes, GatewayIntents } from '../types/gateway.ts'
|
||||||
import { gatewayHandlers } from './handlers/index.ts'
|
import { gatewayHandlers } from './handlers/index.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { User } from '../structures/user.ts'
|
import { User } from '../structures/user.ts'
|
||||||
import { GatewayIntents } from '../types/gatewayTypes.ts'
|
import { GatewayIntents } from '../types/gateway.ts'
|
||||||
import { Gateway } from '../gateway/index.ts'
|
import { Gateway } from '../gateway/index.ts'
|
||||||
import { Rest } from './rest.ts'
|
import { Rest } from './rest.ts'
|
||||||
import EventEmitter from 'https://deno.land/std@0.74.0/node/events.ts'
|
import EventEmitter from 'https://deno.land/std@0.74.0/node/events.ts'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ImageFormats, ImageSize } from '../types/cdnTypes.ts'
|
import { ImageFormats, ImageSize } from '../types/cdn.ts'
|
||||||
|
|
||||||
export const ImageURL = (
|
export const ImageURL = (
|
||||||
url: string,
|
url: string,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { ChannelPayload, ChannelTypes } from '../types/channelTypes.ts'
|
import { ChannelPayload, ChannelTypes } from '../types/channel.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
|
|
||||||
export class Channel extends Base {
|
export class Channel extends Base {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { DMChannelPayload } from '../types/channelTypes.ts'
|
import { DMChannelPayload } from '../types/channel.ts'
|
||||||
import { UserPayload } from '../types/userTypes.ts'
|
import { UserPayload } from '../types/user.ts'
|
||||||
import { TextChannel } from './textChannel.ts'
|
import { TextChannel } from './textChannel.ts'
|
||||||
|
|
||||||
export class DMChannel extends TextChannel {
|
export class DMChannel extends TextChannel {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
EmbedThumbnail,
|
EmbedThumbnail,
|
||||||
EmbedTypes,
|
EmbedTypes,
|
||||||
EmbedVideo
|
EmbedVideo
|
||||||
} from '../types/channelTypes.ts'
|
} from '../types/channel.ts'
|
||||||
|
|
||||||
export class Embed {
|
export class Embed {
|
||||||
title?: string
|
title?: string
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { EmojiPayload } from '../types/emojiTypes.ts'
|
import { EmojiPayload } from '../types/emoji.ts'
|
||||||
import { USER } from '../types/endpoint.ts'
|
import { USER } from '../types/endpoint.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
import { User } from './user.ts'
|
import { User } from './user.ts'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { GroupDMChannelPayload } from '../types/channelTypes.ts'
|
import { GroupDMChannelPayload } from '../types/channel.ts'
|
||||||
import { Channel } from './channel.ts'
|
import { Channel } from './channel.ts'
|
||||||
|
|
||||||
export class GroupDMChannel extends Channel {
|
export class GroupDMChannel extends Channel {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { GuildFeatures, GuildPayload } from '../types/guildTypes.ts'
|
import { GuildFeatures, GuildPayload } from '../types/guild.ts'
|
||||||
import { PresenceUpdatePayload } from '../types/presenceTypes.ts'
|
import { PresenceUpdatePayload } from '../types/presence.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
import { Channel } from './channel.ts'
|
import { Channel } from './channel.ts'
|
||||||
import { Emoji } from './emoji.ts'
|
import { Emoji } from './emoji.ts'
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Channel } from './channel.ts'
|
||||||
import {
|
import {
|
||||||
GuildChannelCategoryPayload,
|
GuildChannelCategoryPayload,
|
||||||
Overwrite
|
Overwrite
|
||||||
} from '../types/channelTypes.ts'
|
} from '../types/channel.ts'
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
|
|
||||||
export class CategoryChannel extends Channel {
|
export class CategoryChannel extends Channel {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { GuildTextChannelPayload, Overwrite } from '../types/channelTypes.ts'
|
import { GuildTextChannelPayload, Overwrite } from '../types/channel.ts'
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { TextChannel } from './textChannel.ts'
|
import { TextChannel } from './textChannel.ts'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { GuildVoiceChannelPayload, Overwrite } from '../types/channelTypes.ts'
|
import { GuildVoiceChannelPayload, Overwrite } from '../types/channel.ts'
|
||||||
import { Channel } from './channel.ts'
|
import { Channel } from './channel.ts'
|
||||||
|
|
||||||
export class VoiceChannel extends Channel {
|
export class VoiceChannel extends Channel {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { GuildNewsChannelPayload, Overwrite } from '../types/channelTypes.ts'
|
import { GuildNewsChannelPayload, Overwrite } from '../types/channel.ts'
|
||||||
import { TextChannel } from './textChannel.ts'
|
import { TextChannel } from './textChannel.ts'
|
||||||
|
|
||||||
export class NewsChannel extends TextChannel {
|
export class NewsChannel extends TextChannel {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { ChannelPayload } from '../types/channelTypes.ts'
|
import { ChannelPayload } from '../types/channel.ts'
|
||||||
import { GuildPayload } from '../types/guildTypes.ts'
|
import { GuildPayload } from '../types/guild.ts'
|
||||||
import { InvitePayload } from '../types/inviteTypes.ts'
|
import { InvitePayload } from '../types/invite.ts'
|
||||||
import { UserPayload } from '../types/userTypes.ts'
|
import { UserPayload } from '../types/user.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
|
|
||||||
export class Invite extends Base {
|
export class Invite extends Base {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { MemberPayload } from '../types/guildTypes.ts'
|
import { MemberPayload } from '../types/guild.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
import { User } from './user.ts'
|
import { User } from './user.ts'
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
MessagePayload,
|
MessagePayload,
|
||||||
MessageReference,
|
MessageReference,
|
||||||
Reaction
|
Reaction
|
||||||
} from '../types/channelTypes.ts'
|
} from '../types/channel.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { User } from './user.ts'
|
import { User } from './user.ts'
|
||||||
import { Member } from './member.ts'
|
import { Member } from './member.ts'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
import { RolePayload } from '../types/roleTypes.ts'
|
import { RolePayload } from '../types/role.ts'
|
||||||
|
|
||||||
export class Role extends Base {
|
export class Role extends Base {
|
||||||
id: string
|
id: string
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { MessageOption, TextChannelPayload } from '../types/channelTypes.ts'
|
import { MessageOption, TextChannelPayload } from '../types/channel.ts'
|
||||||
import { CHANNEL_MESSAGE, CHANNEL_MESSAGES } from '../types/endpoint.ts'
|
import { CHANNEL_MESSAGE, CHANNEL_MESSAGES } from '../types/endpoint.ts'
|
||||||
import { Channel } from './channel.ts'
|
import { Channel } from './channel.ts'
|
||||||
import { Message } from './message.ts'
|
import { Message } from './message.ts'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { UserPayload } from '../types/userTypes.ts'
|
import { UserPayload } from '../types/user.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
|
|
||||||
export class User extends Base {
|
export class User extends Base {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import cache from '../models/cache.ts'
|
import cache from '../models/cache.ts'
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { MemberPayload } from '../types/guildTypes.ts'
|
import { MemberPayload } from '../types/guild.ts'
|
||||||
import { VoiceStatePayload } from '../types/voiceTypes.ts'
|
import { VoiceStatePayload } from '../types/voice.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
|
|
||||||
export class VoiceState extends Base {
|
export class VoiceState extends Base {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Client } from '../models/client.ts'
|
import { Client } from '../models/client.ts'
|
||||||
import { UserPayload } from '../types/userTypes.ts'
|
import { UserPayload } from '../types/user.ts'
|
||||||
import { WebhookPayload } from '../types/webhookTypes.ts'
|
import { WebhookPayload } from '../types/webhook.ts'
|
||||||
import { Base } from './base.ts'
|
import { Base } from './base.ts'
|
||||||
|
|
||||||
export class Webhook extends Base {
|
export class Webhook extends Base {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Embed } from '../structures/embed.ts'
|
import { Embed } from '../structures/embed.ts'
|
||||||
import { EmojiPayload } from './emojiTypes.ts'
|
import { EmojiPayload } from './emoji.ts'
|
||||||
import { MemberPayload } from './guildTypes.ts'
|
import { MemberPayload } from './guild.ts'
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
|
|
||||||
export interface ChannelPayload {
|
export interface ChannelPayload {
|
||||||
id: string
|
id: string
|
|
@ -1,4 +1,4 @@
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
|
|
||||||
export interface EmojiPayload {
|
export interface EmojiPayload {
|
||||||
id: string
|
id: string
|
|
@ -1,10 +1,10 @@
|
||||||
// https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway
|
// https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway
|
||||||
// https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
// https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||||
import { EmojiPayload } from './emojiTypes.ts'
|
import { EmojiPayload } from './emoji.ts'
|
||||||
import { MemberPayload } from './guildTypes.ts'
|
import { MemberPayload } from './guild.ts'
|
||||||
import { ActivityPayload, PresenceUpdatePayload } from './presenceTypes.ts'
|
import { ActivityPayload, PresenceUpdatePayload } from './presence.ts'
|
||||||
import { RolePayload } from './roleTypes.ts'
|
import { RolePayload } from './role.ts'
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gateway OPcodes from Discord docs.
|
* Gateway OPcodes from Discord docs.
|
|
@ -1,4 +1,4 @@
|
||||||
import { GatewayOpcodes, GatewayEvents } from '../types/gatewayTypes.ts'
|
import { GatewayOpcodes, GatewayEvents } from './gateway.ts'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gateway response from Discord.
|
* Gateway response from Discord.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { ChannelPayload } from './channelTypes.ts'
|
import { ChannelPayload } from './channel.ts'
|
||||||
import { EmojiPayload } from './emojiTypes.ts'
|
import { EmojiPayload } from './emoji.ts'
|
||||||
import { PresenceUpdatePayload } from './presenceTypes.ts'
|
import { PresenceUpdatePayload } from './presence.ts'
|
||||||
import { RolePayload } from './roleTypes.ts'
|
import { RolePayload } from './role.ts'
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
import { VoiceStatePayload } from './voiceTypes.ts'
|
import { VoiceStatePayload } from './voice.ts'
|
||||||
|
|
||||||
export interface GuildPayload {
|
export interface GuildPayload {
|
||||||
id: string
|
id: string
|
|
@ -1,6 +1,6 @@
|
||||||
import { ChannelPayload } from './channelTypes.ts'
|
import { ChannelPayload } from './channel.ts'
|
||||||
import { GuildPayload } from './guildTypes.ts'
|
import { GuildPayload } from './guild.ts'
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
|
|
||||||
export interface InvitePayload {
|
export interface InvitePayload {
|
||||||
code: string
|
code: string
|
|
@ -1,4 +1,4 @@
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
|
|
||||||
export interface PresenceUpdatePayload {
|
export interface PresenceUpdatePayload {
|
||||||
user: UserPayload
|
user: UserPayload
|
|
@ -1,5 +1,5 @@
|
||||||
import { GuildPayload } from './guildTypes.ts'
|
import { GuildPayload } from './guild.ts'
|
||||||
import { UserPayload } from './userTypes.ts'
|
import { UserPayload } from './user.ts'
|
||||||
|
|
||||||
export interface TemplatePayload {
|
export interface TemplatePayload {
|
||||||
code: string
|
code: string
|
|
@ -8,7 +8,7 @@ import {
|
||||||
GuildNewsChannelPayload,
|
GuildNewsChannelPayload,
|
||||||
GuildTextChannelPayload,
|
GuildTextChannelPayload,
|
||||||
GuildVoiceChannelPayload
|
GuildVoiceChannelPayload
|
||||||
} from '../types/channelTypes.ts'
|
} from '../types/channel.ts'
|
||||||
import { DMChannel } from '../structures/dmChannel.ts'
|
import { DMChannel } from '../structures/dmChannel.ts'
|
||||||
import { GroupDMChannel } from '../structures/groupChannel.ts'
|
import { GroupDMChannel } from '../structures/groupChannel.ts'
|
||||||
import { CategoryChannel } from '../structures/guildCategoryChannel.ts'
|
import { CategoryChannel } from '../structures/guildCategoryChannel.ts'
|
||||||
|
|
Loading…
Reference in a new issue