import type fixes

This commit is contained in:
Skillz
2020-09-20 19:45:34 -04:00
parent ebc3d9a8b3
commit 0c1f9529e0
38 changed files with 217 additions and 197 deletions
+8 -7
View File
@@ -1,9 +1,4 @@
import { Permissions } from "../types/permission.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
import { Errors } from "../types/errors.ts";
import { RequestManager } from "../module/requestManager.ts";
import { endpoints } from "../constants/discord.ts";
import { MessageCreateOptions } from "../types/message.ts";
import type { MessageCreateOptions } from "../types/message.ts";
import {
GetMessagesAfter,
GetMessagesBefore,
@@ -14,9 +9,15 @@ import {
ChannelEditOptions,
FollowedChannelPayload,
} from "../types/channel.ts";
import type { RawOverwrite } from "../types/guild.ts";
import { logYellow } from "../utils/logger.ts";
import { endpoints } from "../constants/discord.ts";
import { RequestManager } from "../module/requestManager.ts";
import { Errors } from "../types/errors.ts";
import { Permissions } from "../types/permission.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
import { structures } from "../structures/mod.ts";
import { RawOverwrite } from "../types/guild.ts";
/** Checks if a channel overwrite for a user id or a role id has permission in this channel */
export function channelOverwriteHasPermission(
+15 -14
View File
@@ -1,16 +1,10 @@
import { Guild } from "../structures/guild.ts";
import { formatImageURL } from "../utils/cdn.ts";
import { botHasPermission } from "../utils/permissions.ts";
import { RequestManager } from "../module/requestManager.ts";
import { endpoints } from "../constants/discord.ts";
import { Errors } from "../types/errors.ts";
import { Permissions } from "../types/permission.ts";
import type { Guild } from "../structures/guild.ts";
import {
ChannelCreatePayload,
ChannelTypes,
} from "../types/channel.ts";
import { ImageFormats, ImageSize } from "../types/cdn.ts";
import {
import type { ImageFormats, ImageSize } from "../types/cdn.ts";
import type {
CreateEmojisOptions,
PositionSwap,
EditEmojisOptions,
@@ -26,16 +20,23 @@ import {
BannedUser,
UserPayload,
} from "../types/guild.ts";
import { RoleData } from "../types/role.ts";
import type { RoleData } from "../types/role.ts";
import type { MemberCreatePayload } from "../types/member.ts";
import type { Member } from "../structures/member.ts";
import { Collection } from "../utils/collection.ts";
import { urlToBase64 } from "../utils/utils.ts";
import { Intents } from "../types/options.ts";
import { identifyPayload } from "../module/client.ts";
import { requestAllMembers } from "../module/shardingManager.ts";
import { MemberCreatePayload } from "../types/member.ts";
import { Member } from "../structures/member.ts";
import { urlToBase64 } from "../utils/utils.ts";
import { Collection } from "../utils/collection.ts";
import { botHasPermission } from "../utils/permissions.ts";
import { RequestManager } from "../module/requestManager.ts";
import { endpoints } from "../constants/discord.ts";
import { Errors } from "../types/errors.ts";
import { Permissions } from "../types/permission.ts";
import { structures } from "../structures/mod.ts";
import { cacheHandlers } from "../controllers/cache.ts";
import { formatImageURL } from "../utils/cdn.ts";
/** Gets an array of all the channels ids that are the children of this category. */
export function categoryChildrenIDs(guild: Guild, id: string) {
+15 -11
View File
@@ -1,21 +1,25 @@
import { Member } from "../structures/member.ts";
import { ImageSize, ImageFormats } from "../types/cdn.ts";
import type { Member } from "../structures/member.ts";
import type { ImageSize, ImageFormats } from "../types/cdn.ts";
import type {
MessageContent,
DMChannelCreatePayload,
} from "../types/channel.ts";
import type { EditMemberOptions } from "../types/member.ts";
import { sendMessage } from "./channel.ts";
import { structures } from "../structures/mod.ts";
import { cacheHandlers } from "../controllers/cache.ts";
import { formatImageURL } from "../utils/cdn.ts";
import { endpoints } from "../constants/discord.ts";
import { botID } from "../module/client.ts";
import { Permissions } from "../types/permission.ts";
import { Errors } from "../types/errors.ts";
import { RequestManager } from "../module/requestManager.ts";
import {
highestRole,
higherRolePosition,
botHasPermission,
} from "../utils/permissions.ts";
import { botID } from "../module/client.ts";
import { Permissions } from "../types/permission.ts";
import { Errors } from "../types/errors.ts";
import { RequestManager } from "../module/requestManager.ts";
import { MessageContent, DMChannelCreatePayload } from "../types/channel.ts";
import { EditMemberOptions } from "../types/member.ts";
import { sendMessage } from "./channel.ts";
import { structures } from "../structures/mod.ts";
import { cacheHandlers } from "../controllers/cache.ts";
/** The users custom avatar or the default avatar if you don't have a member object. */
export function rawAvatarURL(
+7 -6
View File
@@ -1,16 +1,17 @@
import { Message } from "../structures/message.ts";
import type { Message } from "../structures/message.ts";
import type { MessageContent } from "../types/channel.ts";
import type { UserPayload } from "../types/guild.ts";
import type { MessageCreateOptions } from "../types/message.ts";
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
import { structures } from "../structures/mod.ts";
import { cacheHandlers } from "../controllers/cache.ts";
import { botID } from "../module/client.ts";
import { Permissions } from "../types/permission.ts";
import { Errors } from "../types/errors.ts";
import { RequestManager } from "../module/requestManager.ts";
import { endpoints } from "../constants/discord.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
import { MessageContent } from "../types/channel.ts";
import { UserPayload } from "../types/guild.ts";
import { MessageCreateOptions } from "../types/message.ts";
import { structures } from "../structures/mod.ts";
import { cacheHandlers } from "../controllers/cache.ts";
/** Delete a message */
export async function deleteMessage(
+4 -3
View File
@@ -1,14 +1,15 @@
import {
import type {
WebhookCreateOptions,
WebhookPayload,
ExecuteWebhookOptions,
} from "../types/webhook.ts";
import type { MessageCreateOptions } from "../types/message.ts";
import { botHasChannelPermissions } from "../utils/permissions.ts";
import { Permissions } from "../types/permission.ts";
import { Errors } from "../types/errors.ts";
import { RequestManager } from "../module/requestManager.ts";
import { endpoints } from "../constants/discord.ts";
import { MessageCreateOptions } from "../types/message.ts";
import { urlToBase64 } from "../utils/utils.ts";
import { structures } from "../structures/mod.ts";
@@ -102,5 +103,5 @@ export async function executeWebhook(
}
export function getWebhook(webhookID: string) {
return RequestManager.get(endpoints.WEBHOOK_ID(webhookID))
return RequestManager.get(endpoints.WEBHOOK_ID(webhookID));
}