refactor: centralize types (#235)

* Centralize types and structures

* Resolve Conflict

* Update cache.ts
This commit is contained in:
ITOH
2020-12-08 19:23:36 +01:00
committed by GitHub
parent bc73aeb632
commit 7bdbcb76d6
33 changed files with 133 additions and 105 deletions
+8 -7
View File
@@ -1,22 +1,23 @@
import { cacheHandlers } from "../controllers/cache.ts";
import { RequestManager } from "../module/requestManager.ts";
import { structures } from "../structures/mod.ts";
import { structures } from "../structures/structures.ts";
import {
ChannelEditOptions,
ChannelTypes,
CreateInviteOptions,
Errors,
FollowedChannelPayload,
GetMessages,
GetMessagesAfter,
GetMessagesAround,
GetMessagesBefore,
MessageContent,
} from "../types/channel.ts";
import { Errors } from "../types/errors.ts";
import { RawOverwrite } from "../types/guild.ts";
import { MessageCreateOptions } from "../types/message.ts";
import { Permission, Permissions } from "../types/permission.ts";
import { WebhookPayload } from "../types/webhook.ts";
MessageCreateOptions,
Permission,
Permissions,
RawOverwrite,
WebhookPayload,
} from "../types/types.ts";
import { endpoints } from "../utils/constants.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
+16 -12
View File
@@ -2,18 +2,19 @@ import { cacheHandlers } from "../controllers/cache.ts";
import { identifyPayload } from "../module/client.ts";
import { RequestManager } from "../module/requestManager.ts";
import { requestAllMembers } from "../module/shardingManager.ts";
import { Guild } from "../structures/guild.ts";
import { Member } from "../structures/member.ts";
import { structures } from "../structures/mod.ts";
import { Template } from "../structures/template.ts";
import { ImageFormats, ImageSize } from "../types/cdn.ts";
import { ChannelCreatePayload, ChannelTypes } from "../types/channel.ts";
import { Errors } from "../types/errors.ts";
import {
Guild,
Member,
structures,
Template,
} from "../structures/structures.ts";
import {
AuditLogs,
BannedUser,
BanOptions,
ChannelCreateOptions,
ChannelCreatePayload,
ChannelTypes,
CreateEmojisOptions,
CreateGuildFromTemplate,
CreateGuildPayload,
@@ -23,20 +24,23 @@ import {
EditEmojisOptions,
EditGuildTemplate,
EditIntegrationOptions,
Errors,
FetchMembersOptions,
GetAuditLogsOptions,
GuildEditOptions,
GuildTemplate,
ImageFormats,
ImageSize,
Intents,
MemberCreatePayload,
Permissions,
PositionSwap,
PruneOptions,
PrunePayload,
RoleData,
UpdateGuildPayload,
UserPayload,
} from "../types/guild.ts";
import { MemberCreatePayload } from "../types/member.ts";
import { Intents } from "../types/options.ts";
import { Permissions } from "../types/permission.ts";
import { RoleData } from "../types/role.ts";
} from "../types/types.ts";
import { formatImageURL } from "../utils/cdn.ts";
import { Collection } from "../utils/collection.ts";
import { endpoints } from "../utils/constants.ts";
+9 -6
View File
@@ -1,12 +1,15 @@
import { cacheHandlers } from "../controllers/cache.ts";
import { botID } from "../module/client.ts";
import { RequestManager } from "../module/requestManager.ts";
import { Member } from "../structures/member.ts";
import { structures } from "../structures/mod.ts";
import { ImageFormats, ImageSize } from "../types/cdn.ts";
import { DMChannelCreatePayload, MessageContent } from "../types/channel.ts";
import { Errors } from "../types/errors.ts";
import { EditMemberOptions } from "../types/member.ts";
import { Member, structures } from "../structures/structures.ts";
import {
DMChannelCreatePayload,
EditMemberOptions,
Errors,
ImageFormats,
ImageSize,
MessageContent,
} from "../types/types.ts";
import { formatImageURL } from "../utils/cdn.ts";
import { endpoints } from "../utils/constants.ts";
import {
+7 -6
View File
@@ -2,12 +2,13 @@ import { delay } from "../../deps.ts";
import { cacheHandlers } from "../controllers/cache.ts";
import { botID } from "../module/client.ts";
import { RequestManager } from "../module/requestManager.ts";
import { Message } from "../structures/message.ts";
import { structures } from "../structures/mod.ts";
import { MessageContent } from "../types/channel.ts";
import { Errors } from "../types/errors.ts";
import { UserPayload } from "../types/guild.ts";
import { MessageCreateOptions } from "../types/message.ts";
import { Message, structures } from "../structures/structures.ts";
import {
Errors,
MessageContent,
MessageCreateOptions,
UserPayload,
} from "../types/types.ts";
import { endpoints } from "../utils/constants.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
+4 -4
View File
@@ -1,12 +1,12 @@
import { RequestManager } from "../module/requestManager.ts";
import { structures } from "../structures/mod.ts";
import { Errors } from "../types/errors.ts";
import { MessageCreateOptions } from "../types/message.ts";
import { structures } from "../structures/structures.ts";
import {
Errors,
ExecuteWebhookOptions,
MessageCreateOptions,
WebhookCreateOptions,
WebhookPayload,
} from "../types/webhook.ts";
} from "../types/types.ts";
import { endpoints } from "../utils/constants.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
import { urlToBase64 } from "../utils/utils.ts";