types: remove entire types (#684)

This commit is contained in:
ITOH
2021-03-23 15:14:26 +00:00
committed by GitHub
parent 10cb9d7eb9
commit c91c9d0870
195 changed files with 0 additions and 7043 deletions
-97
View File
@@ -6,15 +6,6 @@ import { editChannel } from "../helpers/channels/edit_channel.ts";
import { editChannelOverwrite } from "../helpers/channels/edit_channel_overwrite.ts";
import { sendMessage } from "../helpers/messages/send_message.ts";
import { disconnectMember } from "../helpers/mod.ts";
import {
ChannelCreatePayload,
ChannelEditOptions,
ChannelType,
MessageContent,
Overwrite,
Permission,
RawOverwrite,
} from "../types/mod.ts";
import { Collection } from "../util/collection.ts";
import { createNewProp } from "../util/utils.ts";
import { CleanVoiceState, Guild } from "./guild.ts";
@@ -111,91 +102,3 @@ export async function createChannelStruct(
return channel as Channel;
}
export interface Channel {
/** The id of this channel */
id: string;
/** Sorting position of the channel */
position?: number;
/** The name of the channel (2-100 characters) */
name?: string;
/** The channel topic (0-1024 characters) */
topic?: string;
/** The bitrate (in bits) of the voice channel */
bitrate?: number;
/** The type of the channel */
type: ChannelType;
/** The guild id of the channel if it is a guild channel. */
guildID: string;
/** The id of the last message sent in this channel */
lastMessageID?: string;
/** The amount of users allowed in this voice channel. */
userLimit?: number;
/** The rate limit (slowmode) in this text channel that users can send messages. */
rateLimitPerUser?: number;
/** The category id for this channel */
parentID?: string;
/** The last time when a message was pinned in this channel */
lastPinTimestamp?: number;
/** The permission overwrites for this channel */
permissionOverwrites: RawOverwrite[];
/** Whether this channel is nsfw or not */
nsfw: boolean;
// GETTERS
/**
* Gets the guild object for this channel.
*
* ⚠️ ADVANCED: If you use the custom cache, these will not work for you. Getters can not be async and custom cache requires async.
*/
guild?: Guild;
/**
* Gets the messages from cache that were sent in this channel
*
* ⚠️ ADVANCED: If you use the custom cache, these will not work for you. Getters can not be async and custom cache requires async.
*/
messages: Collection<string, Message>;
/** The mention of the channel */
mention: string;
/**
* Gets the voice states for this channel
*
* ⚠️ ADVANCED: If you use the custom cache, these will not work for you. Getters can not be async and custom cache requires async.
*/
voiceStates?: Collection<string, CleanVoiceState>;
/**
* Gets the connected members for this channel undefined if member is not cached
*
* ⚠️ ADVANCED: If you use the custom cache, these will not work for you. Getters can not be async and custom cache requires async.
*/
connectedMembers?: Collection<string, Member | undefined>;
// METHODS
/** Send a message to the channel. Requires SEND_MESSAGES permission. */
send(content: string | MessageContent): ReturnType<typeof sendMessage>;
/** Disconnect a member from a voice channel. Requires MOVE_MEMBERS permission. */
disconnect(memberID: string): ReturnType<typeof disconnectMember>;
/** Delete the channel */
delete(): ReturnType<typeof deleteChannel>;
/** Edit a channel Overwrite */
editOverwrite(
overwriteID: string,
options: Omit<Overwrite, "id">,
): ReturnType<typeof editChannelOverwrite>;
/** Delete a channel Overwrite */
deleteOverwrite(
overwriteID: string,
): ReturnType<typeof deleteChannelOverwrite>;
/** Checks if a channel overwrite for a user id or a role id has permission in this channel */
hasPermission(
overwrites: RawOverwrite[],
permissions: Permission[],
): ReturnType<typeof channelOverwriteHasPermission>;
/** Edit the channel */
edit(
options: ChannelEditOptions,
reason?: string,
): ReturnType<typeof editChannel>;
}