diff --git a/src/gateway/handlers/index.ts b/src/gateway/handlers/index.ts index 595ad28..b02cbe2 100644 --- a/src/gateway/handlers/index.ts +++ b/src/gateway/handlers/index.ts @@ -1,5 +1,5 @@ import { GatewayEventHandler } from '../index.ts' -import { GatewayEvents } from '../../types/gatewayTypes.ts' +import { GatewayEvents } from '../../types/gateway.ts' import { channelCreate } from './channelCreate.ts' import { channelDelete } from './channelDelete.ts' import { channelUpdate } from './channelUpdate.ts' diff --git a/src/gateway/handlers/ready.ts b/src/gateway/handlers/ready.ts index ba44d58..9748f36 100644 --- a/src/gateway/handlers/ready.ts +++ b/src/gateway/handlers/ready.ts @@ -1,6 +1,6 @@ import { Guild } from '../../structures/guild.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' export const ready: GatewayEventHandler = (gateway: Gateway, d: any) => { diff --git a/src/gateway/index.ts b/src/gateway/index.ts index 809828a..28fc753 100644 --- a/src/gateway/index.ts +++ b/src/gateway/index.ts @@ -5,7 +5,7 @@ import { DISCORD_API_VERSION } from '../consts/urlsAndVersions.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' /** diff --git a/src/models/client.ts b/src/models/client.ts index 5760c37..00d79e4 100644 --- a/src/models/client.ts +++ b/src/models/client.ts @@ -1,5 +1,5 @@ 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 { Rest } from './rest.ts' import EventEmitter from 'https://deno.land/std@0.74.0/node/events.ts' diff --git a/src/structures/cdn.ts b/src/structures/cdn.ts index b76ab18..fc75238 100644 --- a/src/structures/cdn.ts +++ b/src/structures/cdn.ts @@ -1,4 +1,4 @@ -import { ImageFormats, ImageSize } from '../types/cdnTypes.ts' +import { ImageFormats, ImageSize } from '../types/cdn.ts' export const ImageURL = ( url: string, diff --git a/src/structures/channel.ts b/src/structures/channel.ts index 144b142..eb82947 100644 --- a/src/structures/channel.ts +++ b/src/structures/channel.ts @@ -1,6 +1,6 @@ import cache from '../models/cache.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' export class Channel extends Base { diff --git a/src/structures/dmChannel.ts b/src/structures/dmChannel.ts index 104059f..0236346 100644 --- a/src/structures/dmChannel.ts +++ b/src/structures/dmChannel.ts @@ -1,7 +1,7 @@ import cache from '../models/cache.ts' import { Client } from '../models/client.ts' -import { DMChannelPayload } from '../types/channelTypes.ts' -import { UserPayload } from '../types/userTypes.ts' +import { DMChannelPayload } from '../types/channel.ts' +import { UserPayload } from '../types/user.ts' import { TextChannel } from './textChannel.ts' export class DMChannel extends TextChannel { diff --git a/src/structures/embed.ts b/src/structures/embed.ts index f69a54d..2ce70a1 100644 --- a/src/structures/embed.ts +++ b/src/structures/embed.ts @@ -8,7 +8,7 @@ import { EmbedThumbnail, EmbedTypes, EmbedVideo -} from '../types/channelTypes.ts' +} from '../types/channel.ts' export class Embed { title?: string diff --git a/src/structures/emoji.ts b/src/structures/emoji.ts index e7a19a3..8836993 100644 --- a/src/structures/emoji.ts +++ b/src/structures/emoji.ts @@ -1,5 +1,5 @@ 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 { Base } from './base.ts' import { User } from './user.ts' diff --git a/src/structures/groupChannel.ts b/src/structures/groupChannel.ts index e6f8918..9a6bd50 100644 --- a/src/structures/groupChannel.ts +++ b/src/structures/groupChannel.ts @@ -1,6 +1,6 @@ import cache from '../models/cache.ts' import { Client } from '../models/client.ts' -import { GroupDMChannelPayload } from '../types/channelTypes.ts' +import { GroupDMChannelPayload } from '../types/channel.ts' import { Channel } from './channel.ts' export class GroupDMChannel extends Channel { diff --git a/src/structures/guild.ts b/src/structures/guild.ts index 90234ac..f3e2e6f 100644 --- a/src/structures/guild.ts +++ b/src/structures/guild.ts @@ -1,6 +1,6 @@ import { Client } from '../models/client.ts' -import { GuildFeatures, GuildPayload } from '../types/guildTypes.ts' -import { PresenceUpdatePayload } from '../types/presenceTypes.ts' +import { GuildFeatures, GuildPayload } from '../types/guild.ts' +import { PresenceUpdatePayload } from '../types/presence.ts' import { Base } from './base.ts' import { Channel } from './channel.ts' import { Emoji } from './emoji.ts' diff --git a/src/structures/guildCategoryChannel.ts b/src/structures/guildCategoryChannel.ts index bfb661d..a8dd448 100644 --- a/src/structures/guildCategoryChannel.ts +++ b/src/structures/guildCategoryChannel.ts @@ -3,7 +3,7 @@ import { Channel } from './channel.ts' import { GuildChannelCategoryPayload, Overwrite -} from '../types/channelTypes.ts' +} from '../types/channel.ts' import cache from '../models/cache.ts' export class CategoryChannel extends Channel { diff --git a/src/structures/guildTextChannel.ts b/src/structures/guildTextChannel.ts index 1b8b4ea..2a6278e 100644 --- a/src/structures/guildTextChannel.ts +++ b/src/structures/guildTextChannel.ts @@ -1,5 +1,5 @@ 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 { TextChannel } from './textChannel.ts' diff --git a/src/structures/guildVoiceChannel.ts b/src/structures/guildVoiceChannel.ts index 5f2fc33..252f797 100644 --- a/src/structures/guildVoiceChannel.ts +++ b/src/structures/guildVoiceChannel.ts @@ -1,6 +1,6 @@ import cache from '../models/cache.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' export class VoiceChannel extends Channel { diff --git a/src/structures/guildnewsChannel.ts b/src/structures/guildnewsChannel.ts index 6d0d787..49786ea 100644 --- a/src/structures/guildnewsChannel.ts +++ b/src/structures/guildnewsChannel.ts @@ -1,5 +1,5 @@ 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' export class NewsChannel extends TextChannel { diff --git a/src/structures/invite.ts b/src/structures/invite.ts index 83be8e4..3ce77f7 100644 --- a/src/structures/invite.ts +++ b/src/structures/invite.ts @@ -1,8 +1,8 @@ import { Client } from '../models/client.ts' -import { ChannelPayload } from '../types/channelTypes.ts' -import { GuildPayload } from '../types/guildTypes.ts' -import { InvitePayload } from '../types/inviteTypes.ts' -import { UserPayload } from '../types/userTypes.ts' +import { ChannelPayload } from '../types/channel.ts' +import { GuildPayload } from '../types/guild.ts' +import { InvitePayload } from '../types/invite.ts' +import { UserPayload } from '../types/user.ts' import { Base } from './base.ts' export class Invite extends Base { diff --git a/src/structures/member.ts b/src/structures/member.ts index 6086eb8..764244f 100644 --- a/src/structures/member.ts +++ b/src/structures/member.ts @@ -1,6 +1,6 @@ import cache from '../models/cache.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 { User } from './user.ts' diff --git a/src/structures/message.ts b/src/structures/message.ts index 8dca65d..021e6f7 100644 --- a/src/structures/message.ts +++ b/src/structures/message.ts @@ -8,7 +8,7 @@ import { MessagePayload, MessageReference, Reaction -} from '../types/channelTypes.ts' +} from '../types/channel.ts' import { Client } from '../models/client.ts' import { User } from './user.ts' import { Member } from './member.ts' diff --git a/src/structures/role.ts b/src/structures/role.ts index 442e24e..2d6e2e2 100644 --- a/src/structures/role.ts +++ b/src/structures/role.ts @@ -1,7 +1,7 @@ import cache from '../models/cache.ts' import { Client } from '../models/client.ts' import { Base } from './base.ts' -import { RolePayload } from '../types/roleTypes.ts' +import { RolePayload } from '../types/role.ts' export class Role extends Base { id: string diff --git a/src/structures/textChannel.ts b/src/structures/textChannel.ts index f328662..2484eca 100644 --- a/src/structures/textChannel.ts +++ b/src/structures/textChannel.ts @@ -1,6 +1,6 @@ import cache from '../models/cache.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 } from './channel.ts' import { Message } from './message.ts' diff --git a/src/structures/user.ts b/src/structures/user.ts index 4d0ef1c..574ed1e 100644 --- a/src/structures/user.ts +++ b/src/structures/user.ts @@ -1,6 +1,6 @@ import cache from '../models/cache.ts' import { Client } from '../models/client.ts' -import { UserPayload } from '../types/userTypes.ts' +import { UserPayload } from '../types/user.ts' import { Base } from './base.ts' export class User extends Base { diff --git a/src/structures/voicestate.ts b/src/structures/voicestate.ts index 717880d..3157549 100644 --- a/src/structures/voicestate.ts +++ b/src/structures/voicestate.ts @@ -1,7 +1,7 @@ import cache from '../models/cache.ts' import { Client } from '../models/client.ts' -import { MemberPayload } from '../types/guildTypes.ts' -import { VoiceStatePayload } from '../types/voiceTypes.ts' +import { MemberPayload } from '../types/guild.ts' +import { VoiceStatePayload } from '../types/voice.ts' import { Base } from './base.ts' export class VoiceState extends Base { diff --git a/src/structures/webhook.ts b/src/structures/webhook.ts index 83b9a86..205065c 100644 --- a/src/structures/webhook.ts +++ b/src/structures/webhook.ts @@ -1,6 +1,6 @@ import { Client } from '../models/client.ts' -import { UserPayload } from '../types/userTypes.ts' -import { WebhookPayload } from '../types/webhookTypes.ts' +import { UserPayload } from '../types/user.ts' +import { WebhookPayload } from '../types/webhook.ts' import { Base } from './base.ts' export class Webhook extends Base { diff --git a/src/types/cdnTypes.ts b/src/types/cdn.ts similarity index 100% rename from src/types/cdnTypes.ts rename to src/types/cdn.ts diff --git a/src/types/channelTypes.ts b/src/types/channel.ts similarity index 97% rename from src/types/channelTypes.ts rename to src/types/channel.ts index 0291065..01aa041 100644 --- a/src/types/channelTypes.ts +++ b/src/types/channel.ts @@ -1,7 +1,7 @@ import { Embed } from '../structures/embed.ts' -import { EmojiPayload } from './emojiTypes.ts' -import { MemberPayload } from './guildTypes.ts' -import { UserPayload } from './userTypes.ts' +import { EmojiPayload } from './emoji.ts' +import { MemberPayload } from './guild.ts' +import { UserPayload } from './user.ts' export interface ChannelPayload { id: string diff --git a/src/types/emojiTypes.ts b/src/types/emoji.ts similarity index 81% rename from src/types/emojiTypes.ts rename to src/types/emoji.ts index ac55d5e..ab0216c 100644 --- a/src/types/emojiTypes.ts +++ b/src/types/emoji.ts @@ -1,4 +1,4 @@ -import { UserPayload } from './userTypes.ts' +import { UserPayload } from './user.ts' export interface EmojiPayload { id: string diff --git a/src/types/gatewayTypes.ts b/src/types/gateway.ts similarity index 97% rename from src/types/gatewayTypes.ts rename to src/types/gateway.ts index 048a7fc..4577541 100644 --- a/src/types/gatewayTypes.ts +++ b/src/types/gateway.ts @@ -1,10 +1,10 @@ // https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway // https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events -import { EmojiPayload } from './emojiTypes.ts' -import { MemberPayload } from './guildTypes.ts' -import { ActivityPayload, PresenceUpdatePayload } from './presenceTypes.ts' -import { RolePayload } from './roleTypes.ts' -import { UserPayload } from './userTypes.ts' +import { EmojiPayload } from './emoji.ts' +import { MemberPayload } from './guild.ts' +import { ActivityPayload, PresenceUpdatePayload } from './presence.ts' +import { RolePayload } from './role.ts' +import { UserPayload } from './user.ts' /** * Gateway OPcodes from Discord docs. diff --git a/src/types/gatewayResponse.ts b/src/types/gatewayResponse.ts index 982a19b..6620df8 100644 --- a/src/types/gatewayResponse.ts +++ b/src/types/gatewayResponse.ts @@ -1,4 +1,4 @@ -import { GatewayOpcodes, GatewayEvents } from '../types/gatewayTypes.ts' +import { GatewayOpcodes, GatewayEvents } from './gateway.ts' /** * Gateway response from Discord. diff --git a/src/types/guildTypes.ts b/src/types/guild.ts similarity index 87% rename from src/types/guildTypes.ts rename to src/types/guild.ts index ac37d02..ea73d52 100644 --- a/src/types/guildTypes.ts +++ b/src/types/guild.ts @@ -1,9 +1,9 @@ -import { ChannelPayload } from './channelTypes.ts' -import { EmojiPayload } from './emojiTypes.ts' -import { PresenceUpdatePayload } from './presenceTypes.ts' -import { RolePayload } from './roleTypes.ts' -import { UserPayload } from './userTypes.ts' -import { VoiceStatePayload } from './voiceTypes.ts' +import { ChannelPayload } from './channel.ts' +import { EmojiPayload } from './emoji.ts' +import { PresenceUpdatePayload } from './presence.ts' +import { RolePayload } from './role.ts' +import { UserPayload } from './user.ts' +import { VoiceStatePayload } from './voice.ts' export interface GuildPayload { id: string diff --git a/src/types/inviteTypes.ts b/src/types/invite.ts similarity index 63% rename from src/types/inviteTypes.ts rename to src/types/invite.ts index 3e4a677..6120980 100644 --- a/src/types/inviteTypes.ts +++ b/src/types/invite.ts @@ -1,6 +1,6 @@ -import { ChannelPayload } from './channelTypes.ts' -import { GuildPayload } from './guildTypes.ts' -import { UserPayload } from './userTypes.ts' +import { ChannelPayload } from './channel.ts' +import { GuildPayload } from './guild.ts' +import { UserPayload } from './user.ts' export interface InvitePayload { code: string diff --git a/src/types/presenceTypes.ts b/src/types/presence.ts similarity index 96% rename from src/types/presenceTypes.ts rename to src/types/presence.ts index 05209eb..f4564bf 100644 --- a/src/types/presenceTypes.ts +++ b/src/types/presence.ts @@ -1,4 +1,4 @@ -import { UserPayload } from './userTypes.ts' +import { UserPayload } from './user.ts' export interface PresenceUpdatePayload { user: UserPayload diff --git a/src/types/roleTypes.ts b/src/types/role.ts similarity index 100% rename from src/types/roleTypes.ts rename to src/types/role.ts diff --git a/src/types/templateTypes.ts b/src/types/template.ts similarity index 77% rename from src/types/templateTypes.ts rename to src/types/template.ts index b80a488..8128515 100644 --- a/src/types/templateTypes.ts +++ b/src/types/template.ts @@ -1,5 +1,5 @@ -import { GuildPayload } from './guildTypes.ts' -import { UserPayload } from './userTypes.ts' +import { GuildPayload } from './guild.ts' +import { UserPayload } from './user.ts' export interface TemplatePayload { code: string diff --git a/src/types/userTypes.ts b/src/types/user.ts similarity index 100% rename from src/types/userTypes.ts rename to src/types/user.ts diff --git a/src/types/voiceTypes.ts b/src/types/voice.ts similarity index 100% rename from src/types/voiceTypes.ts rename to src/types/voice.ts diff --git a/src/types/webhookTypes.ts b/src/types/webhook.ts similarity index 100% rename from src/types/webhookTypes.ts rename to src/types/webhook.ts diff --git a/src/utils/getChannelByType.ts b/src/utils/getChannelByType.ts index 26675cd..8b0f9f1 100644 --- a/src/utils/getChannelByType.ts +++ b/src/utils/getChannelByType.ts @@ -8,7 +8,7 @@ import { GuildNewsChannelPayload, GuildTextChannelPayload, GuildVoiceChannelPayload -} from '../types/channelTypes.ts' +} from '../types/channel.ts' import { DMChannel } from '../structures/dmChannel.ts' import { GroupDMChannel } from '../structures/groupChannel.ts' import { CategoryChannel } from '../structures/guildCategoryChannel.ts'