mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-15 19:08:17 +00:00
fix mod.ts export (#2121)
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
@@ -61,7 +61,13 @@ import { transformWidget } from "./transformers/widget.ts";
|
|||||||
import { transformStageInstance } from "./transformers/stageInstance.ts";
|
import { transformStageInstance } from "./transformers/stageInstance.ts";
|
||||||
import { StickerPack, transformSticker, transformStickerPack } from "./transformers/sticker.ts";
|
import { StickerPack, transformSticker, transformStickerPack } from "./transformers/sticker.ts";
|
||||||
import { GetGatewayBot, transformGatewayBot } from "./transformers/gatewayBot.ts";
|
import { GetGatewayBot, transformGatewayBot } from "./transformers/gatewayBot.ts";
|
||||||
import { DiscordEmoji, DiscordGatewayPayload, DiscordInteractionDataOption, DiscordReady, DiscordStickerPack } from "./types/discord.ts";
|
import {
|
||||||
|
DiscordEmoji,
|
||||||
|
DiscordGatewayPayload,
|
||||||
|
DiscordInteractionDataOption,
|
||||||
|
DiscordReady,
|
||||||
|
DiscordStickerPack,
|
||||||
|
} from "./types/discord.ts";
|
||||||
import { Errors, GatewayDispatchEventNames, GatewayIntents } from "./types/shared.ts";
|
import { Errors, GatewayDispatchEventNames, GatewayIntents } from "./types/shared.ts";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -684,7 +690,6 @@ export interface BotGatewayHandlerOptions {
|
|||||||
THREAD_UPDATE: typeof handlers.handleThreadUpdate;
|
THREAD_UPDATE: typeof handlers.handleThreadUpdate;
|
||||||
THREAD_DELETE: typeof handlers.handleThreadDelete;
|
THREAD_DELETE: typeof handlers.handleThreadDelete;
|
||||||
THREAD_LIST_SYNC: typeof handlers.handleThreadListSync;
|
THREAD_LIST_SYNC: typeof handlers.handleThreadListSync;
|
||||||
THREAD_MEMBER_UPDATE: typeof handlers.handleThreadMemberUpdate;
|
|
||||||
THREAD_MEMBERS_UPDATE: typeof handlers.handleThreadMembersUpdate;
|
THREAD_MEMBERS_UPDATE: typeof handlers.handleThreadMembersUpdate;
|
||||||
STAGE_INSTANCE_CREATE: typeof handlers.handleStageInstanceCreate;
|
STAGE_INSTANCE_CREATE: typeof handlers.handleStageInstanceCreate;
|
||||||
STAGE_INSTANCE_UPDATE: typeof handlers.handleStageInstanceUpdate;
|
STAGE_INSTANCE_UPDATE: typeof handlers.handleStageInstanceUpdate;
|
||||||
@@ -750,7 +755,6 @@ export function createBotGatewayHandlers(
|
|||||||
THREAD_UPDATE: options.THREAD_UPDATE ?? handlers.handleThreadUpdate,
|
THREAD_UPDATE: options.THREAD_UPDATE ?? handlers.handleThreadUpdate,
|
||||||
THREAD_DELETE: options.THREAD_DELETE ?? handlers.handleThreadDelete,
|
THREAD_DELETE: options.THREAD_DELETE ?? handlers.handleThreadDelete,
|
||||||
THREAD_LIST_SYNC: options.THREAD_LIST_SYNC ?? handlers.handleThreadListSync,
|
THREAD_LIST_SYNC: options.THREAD_LIST_SYNC ?? handlers.handleThreadListSync,
|
||||||
THREAD_MEMBER_UPDATE: options.THREAD_MEMBER_UPDATE ?? handlers.handleThreadMemberUpdate,
|
|
||||||
THREAD_MEMBERS_UPDATE: options.THREAD_MEMBERS_UPDATE ?? handlers.handleThreadMembersUpdate,
|
THREAD_MEMBERS_UPDATE: options.THREAD_MEMBERS_UPDATE ?? handlers.handleThreadMembersUpdate,
|
||||||
STAGE_INSTANCE_CREATE: options.STAGE_INSTANCE_CREATE ??
|
STAGE_INSTANCE_CREATE: options.STAGE_INSTANCE_CREATE ??
|
||||||
handlers.handleStageInstanceCreate,
|
handlers.handleStageInstanceCreate,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { GatewayCloseEventCodes } from "../types/shared.ts";
|
import { GatewayCloseEventCodes } from "../types/shared.ts";
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
export function createShard(gateway: GatewayManager, shardId: number) {
|
export function createShard(gateway: GatewayManager, shardId: number) {
|
||||||
const socket = new WebSocket(`${gateway.urlWSS}/?v=9&encoding=json`);
|
const socket = new WebSocket(`${gateway.urlWSS}/?v=9&encoding=json`);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
import { snowflakeToBigint } from "../util/bigint.ts";
|
import { snowflakeToBigint } from "../util/bigint.ts";
|
||||||
import { delay } from "../util/utils.ts";
|
import { delay } from "../util/utils.ts";
|
||||||
import { decompressWith } from "./deps.ts";
|
import { decompressWith } from "./deps.ts";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { GatewayOpcodes } from "../types/shared.ts";
|
import { GatewayOpcodes } from "../types/shared.ts";
|
||||||
import { delay } from "../util/utils.ts";
|
import { delay } from "../util/utils.ts";
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
export async function heartbeat(gateway: GatewayManager, shardId: number, interval: number) {
|
export async function heartbeat(gateway: GatewayManager, shardId: number, interval: number) {
|
||||||
gateway.debug("GW HEARTBEATING_STARTED", { shardId, interval });
|
gateway.debug("GW HEARTBEATING_STARTED", { shardId, interval });
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { GatewayOpcodes } from "../types/shared.ts";
|
import { GatewayOpcodes } from "../types/shared.ts";
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
export function identify(gateway: GatewayManager, shardId: number, maxShards: number) {
|
export function identify(gateway: GatewayManager, shardId: number, maxShards: number) {
|
||||||
gateway.debug("GW IDENTIFYING", { shardId, maxShards });
|
gateway.debug("GW IDENTIFYING", { shardId, maxShards });
|
||||||
|
|||||||
+7
-6
@@ -1,15 +1,16 @@
|
|||||||
|
export * from "./calculateMaxShards.ts";
|
||||||
export * from "./closeWs.ts";
|
export * from "./closeWs.ts";
|
||||||
export * from "./createShard.ts";
|
export * from "./createShard.ts";
|
||||||
|
export * from "./gatewayManager.ts";
|
||||||
export * from "./handleOnMessage.ts";
|
export * from "./handleOnMessage.ts";
|
||||||
export * from "./heartbeat.ts";
|
export * from "./heartbeat.ts";
|
||||||
export * from "./identify.ts";
|
export * from "./identify.ts";
|
||||||
export * from "./processGatewayQueue.ts";
|
export * from "./processGatewayQueue.ts";
|
||||||
export * from "./resharder.ts";
|
export * from "./resharder.ts";
|
||||||
export * from "./resume.ts";
|
export * from "./resume.ts";
|
||||||
export * from "./spawnShards.ts";
|
|
||||||
export * from "./sendShardMessage.ts";
|
|
||||||
export * from "./tellWorkerToIdentify.ts";
|
|
||||||
export * from "./shard.ts";
|
|
||||||
export * from "./gateway_manager.ts";
|
|
||||||
export * from "./safeRequestsPerShard.ts";
|
export * from "./safeRequestsPerShard.ts";
|
||||||
export * from "./calculateMaxShards.ts";
|
export * from "./sendShardMessage.ts";
|
||||||
|
export * from "./shard.ts";
|
||||||
|
export * from "./spawnShards.ts";
|
||||||
|
export * from "./stopGateway.ts";
|
||||||
|
export * from "./tellWorkerToIdentify.ts";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { delay } from "../util/utils.ts";
|
import { delay } from "../util/utils.ts";
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
export async function processGatewayQueue(gateway: GatewayManager, id: number) {
|
export async function processGatewayQueue(gateway: GatewayManager, id: number) {
|
||||||
const shard = gateway.shards.get(id);
|
const shard = gateway.shards.get(id);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { GetGatewayBot, transformGatewayBot } from "../transformers/gatewayBot.ts";
|
import { GetGatewayBot, transformGatewayBot } from "../transformers/gatewayBot.ts";
|
||||||
import { DiscordReady } from "../types/discord.ts";
|
import { DiscordReady } from "../types/discord.ts";
|
||||||
import { createGatewayManager, GatewayManager } from "./gateway_manager.ts";
|
import { createGatewayManager, GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
/** The handler to automatically reshard when necessary. */
|
/** The handler to automatically reshard when necessary. */
|
||||||
export async function resharder(
|
export async function resharder(
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { GatewayOpcodes } from "../types/shared.ts";
|
import { GatewayOpcodes } from "../types/shared.ts";
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
export function resume(gateway: GatewayManager, shardId: number) {
|
export function resume(gateway: GatewayManager, shardId: number) {
|
||||||
gateway.debug("GW RESUMING", { shardId });
|
gateway.debug("GW RESUMING", { shardId });
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
import { DiscordenoShard } from "./shard.ts";
|
import { DiscordenoShard } from "./shard.ts";
|
||||||
|
|
||||||
export function safeRequestsPerShard(gateway: GatewayManager, shard: DiscordenoShard) {
|
export function safeRequestsPerShard(gateway: GatewayManager, shard: DiscordenoShard) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
import { DiscordenoShard, WebSocketRequest } from "./shard.ts";
|
import { DiscordenoShard, WebSocketRequest } from "./shard.ts";
|
||||||
|
|
||||||
export function sendShardMessage(
|
export function sendShardMessage(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/** Begin spawning shards. */
|
/** Begin spawning shards. */
|
||||||
|
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
export function prepareBuckets(gateway: GatewayManager, firstShardId: number, lastShardId: number) {
|
export function prepareBuckets(gateway: GatewayManager, firstShardId: number, lastShardId: number) {
|
||||||
/** Stored as bucketId: [workerId, [ShardIds]] */
|
/** Stored as bucketId: [workerId, [ShardIds]] */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { delay } from "../util/utils.ts";
|
import { delay } from "../util/utils.ts";
|
||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
/** Use this function to stop the gateway properly */
|
/** Use this function to stop the gateway properly */
|
||||||
export async function stopGateway(
|
export async function stopGateway(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GatewayManager } from "./gateway_manager.ts";
|
import { GatewayManager } from "./gatewayManager.ts";
|
||||||
|
|
||||||
/** Allows users to hook in and change to communicate to different workers across different servers or anything they like. For example using redis pubsub to talk to other servers. */
|
/** Allows users to hook in and change to communicate to different workers across different servers or anything they like. For example using redis pubsub to talk to other servers. */
|
||||||
export async function tellWorkerToIdentify(
|
export async function tellWorkerToIdentify(
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
import { Bot } from "../../bot.ts";
|
|
||||||
import { DiscordGatewayPayload } from "../../types/discord.ts";
|
|
||||||
|
|
||||||
export async function handleThreadMemberUpdate(bot: Bot, data: DiscordGatewayPayload) {
|
|
||||||
// This event is documented for completeness, but unlikely to be used by most bots
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
export * from "./CHANNEL_CREATE.ts";
|
||||||
|
export * from "./CHANNEL_DELETE.ts";
|
||||||
|
export * from "./CHANNEL_PINS_UPDATE.ts";
|
||||||
|
export * from "./CHANNEL_UPDATE.ts";
|
||||||
|
export * from "./STAGE_INSTANCE_CREATE.ts";
|
||||||
|
export * from "./STAGE_INSTANCE_DELETE.ts";
|
||||||
|
export * from "./STAGE_INSTANCE_UPDATE.ts";
|
||||||
|
export * from "./THREAD_CREATE.ts";
|
||||||
|
export * from "./THREAD_DELETE.ts";
|
||||||
|
export * from "./THREAD_LIST_SYNC.ts";
|
||||||
|
export * from "./THREAD_MEMBERS_UPDATE.ts";
|
||||||
|
export * from "./THREAD_UPDATE.ts";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./GUILD_EMOJIS_UPDATE.ts";
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
export * from "./scheduledEvents/mod.ts";
|
||||||
|
|
||||||
|
export * from "./GUILD_BAN_ADD.ts";
|
||||||
|
export * from "./GUILD_BAN_REMOVE.ts";
|
||||||
|
export * from "./GUILD_CREATE.ts";
|
||||||
|
export * from "./GUILD_DELETE.ts";
|
||||||
|
export * from "./GUILD_INTEGRATIONS_UPDATE.ts";
|
||||||
|
export * from "./GUILD_LOADED_DD.ts";
|
||||||
|
export * from "./GUILD_UPDATE.ts";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export * from "./GUILD_SCHEDULED_EVENT_CREATE.ts";
|
||||||
|
export * from "./GUILD_SCHEDULED_EVENT_DELETE.ts";
|
||||||
|
export * from "./GUILD_SCHEDULED_EVENT_UPDATE.ts";
|
||||||
|
export * from "./GUILD_SCHEDULED_EVENT_USER_ADD.ts";
|
||||||
|
export * from "./GUILD_SCHEDULED_EVENT_USER_REMOVE.ts";
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export * from "./INTEGRATION_CREATE.ts";
|
||||||
|
export * from "./INTEGRATION_DELETE.ts";
|
||||||
|
export * from "./INTEGRATION_UPDATE.ts";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./INTERACTION_CREATE.ts";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export * from "./INVITE_CREATE.ts";
|
||||||
|
export * from "./INVITE_DELETE.ts";
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export * from "./GUILD_MEMBER_ADD.ts";
|
||||||
|
export * from "./GUILD_MEMBER_REMOVE.ts";
|
||||||
|
export * from "./GUILD_MEMBER_UPDATE.ts";
|
||||||
|
export * from "./GUILD_MEMBERS_CHUNK.ts";
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
export * from "./MESSAGE_CREATE.ts";
|
||||||
|
export * from "./MESSAGE_DELETE_BULK.ts";
|
||||||
|
export * from "./MESSAGE_DELETE.ts";
|
||||||
|
export * from "./MESSAGE_REACTION_ADD.ts";
|
||||||
|
export * from "./MESSAGE_REACTION_REMOVE_ALL.ts";
|
||||||
|
export * from "./MESSAGE_REACTION_REMOVE_EMOJI.ts";
|
||||||
|
export * from "./MESSAGE_REACTION_REMOVE.ts";
|
||||||
|
export * from "./MESSAGE_UPDATE.ts";
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export * from "./PRESENCE_UPDATE.ts";
|
||||||
|
export * from "./READY.ts";
|
||||||
|
export * from "./TYPING_START.ts";
|
||||||
|
export * from "./USER_UPDATE.ts";
|
||||||
+12
-76
@@ -1,76 +1,12 @@
|
|||||||
//channels
|
export * from "./channels/mod.ts";
|
||||||
export * from "./channels/CHANNEL_CREATE.ts";
|
export * from "./emojis/mod.ts";
|
||||||
export * from "./channels/CHANNEL_DELETE.ts";
|
export * from "./guilds/mod.ts";
|
||||||
export * from "./channels/CHANNEL_PINS_UPDATE.ts";
|
export * from "./integrations/mod.ts";
|
||||||
export * from "./channels/CHANNEL_UPDATE.ts";
|
export * from "./interactions/mod.ts";
|
||||||
export * from "./channels/STAGE_INSTANCE_CREATE.ts";
|
export * from "./invites/mod.ts";
|
||||||
export * from "./channels/STAGE_INSTANCE_UPDATE.ts";
|
export * from "./members/mod.ts";
|
||||||
export * from "./channels/STAGE_INSTANCE_DELETE.ts";
|
export * from "./messages/mod.ts";
|
||||||
export * from "./channels/THREAD_CREATE.ts";
|
export * from "./misc/mod.ts";
|
||||||
export * from "./channels/THREAD_DELETE.ts";
|
export * from "./roles/mod.ts";
|
||||||
export * from "./channels/THREAD_LIST_SYNC.ts";
|
export * from "./voice/mod.ts";
|
||||||
export * from "./channels/THREAD_MEMBERS_UPDATE.ts";
|
export * from "./webhooks/mod.ts";
|
||||||
export * from "./channels/THREAD_MEMBER_UPDATE.ts";
|
|
||||||
export * from "./channels/THREAD_UPDATE.ts";
|
|
||||||
|
|
||||||
//emojis
|
|
||||||
export * from "./emojis/GUILD_EMOJIS_UPDATE.ts";
|
|
||||||
|
|
||||||
//guilds
|
|
||||||
export * from "./guilds/GUILD_BAN_ADD.ts";
|
|
||||||
export * from "./guilds/GUILD_BAN_REMOVE.ts";
|
|
||||||
export * from "./guilds/GUILD_CREATE.ts";
|
|
||||||
export * from "./guilds/GUILD_DELETE.ts";
|
|
||||||
export * from "./guilds/GUILD_INTEGRATIONS_UPDATE.ts";
|
|
||||||
export * from "./guilds/GUILD_UPDATE.ts";
|
|
||||||
|
|
||||||
//intergrations
|
|
||||||
export * from "./integrations/INTEGRATION_CREATE.ts";
|
|
||||||
export * from "./integrations/INTEGRATION_DELETE.ts";
|
|
||||||
export * from "./integrations/INTEGRATION_UPDATE.ts";
|
|
||||||
export * from "./interactions/INTERACTION_CREATE.ts";
|
|
||||||
|
|
||||||
//invites
|
|
||||||
export * from "./invites/INVITE_CREATE.ts";
|
|
||||||
|
|
||||||
//members
|
|
||||||
export * from "./members/GUILD_MEMBERS_CHUNK.ts";
|
|
||||||
export * from "./members/GUILD_MEMBER_ADD.ts";
|
|
||||||
export * from "./members/GUILD_MEMBER_REMOVE.ts";
|
|
||||||
export * from "./members/GUILD_MEMBER_UPDATE.ts";
|
|
||||||
|
|
||||||
//messages
|
|
||||||
export * from "./messages/MESSAGE_CREATE.ts";
|
|
||||||
export * from "./messages/MESSAGE_DELETE.ts";
|
|
||||||
export * from "./messages/MESSAGE_DELETE_BULK.ts";
|
|
||||||
export * from "./messages/MESSAGE_REACTION_ADD.ts";
|
|
||||||
export * from "./messages/MESSAGE_REACTION_REMOVE.ts";
|
|
||||||
export * from "./messages/MESSAGE_REACTION_REMOVE_ALL.ts";
|
|
||||||
export * from "./messages/MESSAGE_REACTION_REMOVE_EMOJI.ts";
|
|
||||||
export * from "./messages/MESSAGE_UPDATE.ts";
|
|
||||||
|
|
||||||
//misc
|
|
||||||
export * from "./misc/PRESENCE_UPDATE.ts";
|
|
||||||
export * from "./misc/READY.ts";
|
|
||||||
export * from "./misc/TYPING_START.ts";
|
|
||||||
export * from "./misc/USER_UPDATE.ts";
|
|
||||||
|
|
||||||
//roles
|
|
||||||
export * from "./roles/GUILD_ROLE_CREATE.ts";
|
|
||||||
export * from "./roles/GUILD_ROLE_DELETE.ts";
|
|
||||||
export * from "./roles/GUILD_ROLE_UPDATE.ts";
|
|
||||||
|
|
||||||
//voice
|
|
||||||
export * from "./voice/VOICE_SERVER_UPDATE.ts";
|
|
||||||
export * from "./voice/VOICE_STATE_UPDATE.ts";
|
|
||||||
|
|
||||||
//webhooks
|
|
||||||
export * from "./webhooks/WEBHOOKS_UPDATE.ts";
|
|
||||||
|
|
||||||
//guilds
|
|
||||||
export * from "./guilds/GUILD_LOADED_DD.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/GUILD_SCHEDULED_EVENT_CREATE.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/GUILD_SCHEDULED_EVENT_DELETE.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/GUILD_SCHEDULED_EVENT_UPDATE.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/GUILD_SCHEDULED_EVENT_USER_ADD.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/GUILD_SCHEDULED_EVENT_USER_REMOVE.ts";
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export * from "./GUILD_ROLE_CREATE.ts";
|
||||||
|
export * from "./GUILD_ROLE_DELETE.ts";
|
||||||
|
export * from "./GUILD_ROLE_UPDATE.ts";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export * from "./VOICE_SERVER_UPDATE.ts";
|
||||||
|
export * from "./VOICE_STATE_UPDATE.ts";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./WEBHOOKS_UPDATE.ts";
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
export * from "./threads/mod.ts";
|
||||||
|
|
||||||
|
export * from "./createChannel.ts";
|
||||||
|
export * from "./createStageInstance.ts";
|
||||||
|
export * from "./deleteChannel.ts";
|
||||||
|
export * from "./deleteChannelOverwrite.ts";
|
||||||
|
export * from "./deleteStageInstance.ts";
|
||||||
|
export * from "./editChannel.ts";
|
||||||
|
export * from "./editChannelOverwrite.ts";
|
||||||
|
export * from "./followChannel.ts";
|
||||||
|
export * from "./getChannel.ts";
|
||||||
|
export * from "./getChannels.ts";
|
||||||
|
export * from "./getChannelWebhooks.ts";
|
||||||
|
export * from "./getPins.ts";
|
||||||
|
export * from "./getStageInstance.ts";
|
||||||
|
export * from "./startTyping.ts";
|
||||||
|
export * from "./swapChannels.ts";
|
||||||
|
export * from "./updateStageInstance.ts";
|
||||||
|
export * from "./updateVoiceState.ts";
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
export * from "./addToThread.ts";
|
export * from "./addToThread.ts";
|
||||||
export * from "./getActiveThreads.ts";
|
export * from "./getActiveThreads.ts";
|
||||||
export * from "./getArchivedThreads.ts";
|
export * from "./getArchivedThreads.ts";
|
||||||
|
export * from "./getThreadMember.ts";
|
||||||
export * from "./getThreadMembers.ts";
|
export * from "./getThreadMembers.ts";
|
||||||
export * from "./joinThread.ts";
|
export * from "./joinThread.ts";
|
||||||
export * from "./leaveThread.ts";
|
export * from "./leaveThread.ts";
|
||||||
export * from "./removeThreadMember.ts";
|
export * from "./removeThreadMember.ts";
|
||||||
export * from "./startThreadWithoutMessage.ts";
|
|
||||||
export * from "./startThreadWithMessage.ts";
|
export * from "./startThreadWithMessage.ts";
|
||||||
|
export * from "./startThreadWithoutMessage.ts";
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from "./addDiscoverySubcategory.ts";
|
||||||
|
export * from "./editDiscovery.ts";
|
||||||
|
export * from "./getDiscovery.ts";
|
||||||
|
export * from "./getDiscoveryCategories.ts";
|
||||||
|
export * from "./removeDiscoverySubcategory.ts";
|
||||||
|
export * from "./validDiscoveryTerm.ts";
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from "./createEmoji.ts";
|
||||||
|
export * from "./deleteEmoji.ts";
|
||||||
|
export * from "./editEmoji.ts";
|
||||||
|
export * from "./emojiUrl.ts";
|
||||||
|
export * from "./getEmoji.ts";
|
||||||
|
export * from "./getEmojis.ts";
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
export * from "./scheduledEvents/mod.ts";
|
||||||
|
|
||||||
|
export * from "./createGuild.ts";
|
||||||
|
export * from "./deleteGuild.ts";
|
||||||
|
export * from "./editGuild.ts";
|
||||||
|
export * from "./editWelcomeScreen.ts";
|
||||||
|
export * from "./editWidget.ts";
|
||||||
|
export * from "./getAuditLogs.ts";
|
||||||
|
export * from "./getAvailableVoiceRegions.ts";
|
||||||
|
export * from "./getBan.ts";
|
||||||
|
export * from "./getBans.ts";
|
||||||
|
export * from "./getGuild.ts";
|
||||||
|
export * from "./getGuildPreview.ts";
|
||||||
|
export * from "./getPruneCount.ts";
|
||||||
|
export * from "./getVanityUrl.ts";
|
||||||
|
export * from "./getVoiceRegions.ts";
|
||||||
|
export * from "./getWelcomeScreen.ts";
|
||||||
|
export * from "./getWidget.ts";
|
||||||
|
export * from "./getWidgetImageUrl.ts";
|
||||||
|
export * from "./getWidgetSettings.ts";
|
||||||
|
export * from "./guildBannerUrl.ts";
|
||||||
|
export * from "./guildIconUrl.ts";
|
||||||
|
export * from "./guildSplashUrl.ts";
|
||||||
|
export * from "./leaveGuild.ts";
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from "./createScheduledEvent.ts";
|
||||||
|
export * from "./deleteScheduledEvent.ts";
|
||||||
|
export * from "./editScheduledEvent.ts";
|
||||||
|
export * from "./getScheduledEvent.ts";
|
||||||
|
export * from "./getScheduledEvents.ts";
|
||||||
|
export * from "./getScheduledEventUsers.ts";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export * from "./deleteIntegration.ts";
|
||||||
|
export * from "./getIntegrations.ts";
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
export * from "./batchEditApplicationCommandPermissions.ts";
|
||||||
|
export * from "./createApplicationCommand.ts";
|
||||||
|
export * from "./deleteApplicationCommand.ts";
|
||||||
|
export * from "./deleteInteractionResponse.ts";
|
||||||
|
export * from "./editApplicationCommandPermissions.ts";
|
||||||
|
export * from "./editInteractionResponse.ts";
|
||||||
|
export * from "./getApplicationCommand.ts";
|
||||||
|
export * from "./getApplicationCommandPermission.ts";
|
||||||
|
export * from "./getApplicationCommandPermissions.ts";
|
||||||
|
export * from "./getApplicationCommands.ts";
|
||||||
|
export * from "./upsertApplicationCommand.ts";
|
||||||
|
export * from "./upsertApplicationCommands.ts";
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export * from "./deleteFollowupMessage.ts";
|
||||||
|
export * from "./editFollowupMessage.ts";
|
||||||
|
export * from "./getFollowupMessage.ts";
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from "./commands/mod.ts";
|
||||||
|
export * from "./followups/mod.ts";
|
||||||
|
|
||||||
|
export * from "./getOriginalInteractionResponse.ts";
|
||||||
|
export * from "./sendInteractionResponse.ts";
|
||||||
|
export * from "./verifySignature.ts";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export * from "./createInvite.ts";
|
||||||
|
export * from "./deleteInvite.ts";
|
||||||
|
export * from "./getChannelInvites.ts";
|
||||||
|
export * from "./getInvite.ts";
|
||||||
|
export * from "./getInvites.ts";
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
export * from "./avatarUrl.ts";
|
||||||
|
export * from "./banMember.ts";
|
||||||
|
export * from "./editBotNickname.ts";
|
||||||
|
export * from "./editMember.ts";
|
||||||
|
export * from "./fetchMembers.ts";
|
||||||
|
export * from "./getDmChannel.ts";
|
||||||
|
export * from "./getMember.ts";
|
||||||
|
export * from "./getMembers.ts";
|
||||||
|
export * from "./kickMember.ts";
|
||||||
|
export * from "./pruneMembers.ts";
|
||||||
|
export * from "./searchMembers.ts";
|
||||||
|
export * from "./unbanMember.ts";
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import type { GuildMemberWithUser } from "../../types/members/guildMember.ts";
|
import type { SearchMembers } from "../../types/discordeno.ts";
|
||||||
import type { SearchGuildMembers } from "../../types/members/searchGuildMembers.ts";
|
import type { DiscordMemberWithUser } from "../../types/discord.ts";
|
||||||
|
|
||||||
import { Collection } from "../../util/collection.ts";
|
import { Collection } from "../../util/collection.ts";
|
||||||
import { Bot } from "../../bot.ts";
|
import { Bot } from "../../bot.ts";
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ export async function searchMembers(
|
|||||||
bot: Bot,
|
bot: Bot,
|
||||||
guildId: bigint,
|
guildId: bigint,
|
||||||
query: string,
|
query: string,
|
||||||
options?: Omit<SearchGuildMembers, "query">,
|
options?: Omit<SearchMembers, "query">,
|
||||||
) {
|
) {
|
||||||
if (options?.limit) {
|
if (options?.limit) {
|
||||||
if (options.limit < 1) throw new Error(bot.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_LOW);
|
if (options.limit < 1) throw new Error(bot.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_LOW);
|
||||||
@@ -19,7 +20,7 @@ export async function searchMembers(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await bot.rest.runMethod<GuildMemberWithUser[]>(
|
const result = await bot.rest.runMethod<DiscordMemberWithUser[]>(
|
||||||
bot.rest,
|
bot.rest,
|
||||||
"get",
|
"get",
|
||||||
bot.constants.endpoints.GUILD_MEMBERS_SEARCH(guildId),
|
bot.constants.endpoints.GUILD_MEMBERS_SEARCH(guildId),
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
export * from "./addReaction.ts";
|
||||||
|
export * from "./addReactions.ts";
|
||||||
|
export * from "./deleteMessage.ts";
|
||||||
|
export * from "./deleteMessages.ts";
|
||||||
|
export * from "./editMessage.ts";
|
||||||
|
export * from "./getMessage.ts";
|
||||||
|
export * from "./getMessages.ts";
|
||||||
|
export * from "./getReactions.ts";
|
||||||
|
export * from "./pinMessage.ts";
|
||||||
|
export * from "./publishMessage.ts";
|
||||||
|
export * from "./removeAllReactions.ts";
|
||||||
|
export * from "./removeReaction.ts";
|
||||||
|
export * from "./removeReactionEmoji.ts";
|
||||||
|
export * from "./sendMessage.ts";
|
||||||
|
export * from "./unpinMessage.ts";
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export * from "./editBotProfile.ts";
|
||||||
|
export * from "./editBotStatus.ts";
|
||||||
|
export * from "./getGatewayBot.ts";
|
||||||
|
export * from "./getUser.ts";
|
||||||
|
export * from "./nitroStickerPacks.ts";
|
||||||
+15
-179
@@ -1,179 +1,15 @@
|
|||||||
//channels
|
export * from "./channels/mod.ts";
|
||||||
export * from "./channels/createChannel.ts";
|
export * from "./discovery/mod.ts";
|
||||||
export * from "./channels/deleteChannel.ts";
|
export * from "./emojis/mod.ts";
|
||||||
export * from "./channels/deleteChannelOverwrite.ts";
|
export * from "./guilds/mod.ts";
|
||||||
export * from "./channels/editChannel.ts";
|
export * from "./integrations/mod.ts";
|
||||||
export * from "./channels/editChannelOverwrite.ts";
|
export * from "./interactions/mod.ts";
|
||||||
export * from "./channels/followChannel.ts";
|
export * from "./invites/mod.ts";
|
||||||
export * from "./channels/getChannel.ts";
|
export * from "./members/mod.ts";
|
||||||
export * from "./channels/getChannels.ts";
|
export * from "./messages/mod.ts";
|
||||||
export * from "./channels/getChannelWebhooks.ts";
|
export * from "./misc/mod.ts";
|
||||||
export * from "./channels/getPins.ts";
|
export * from "./oauth/mod.ts";
|
||||||
export * from "./channels/startTyping.ts";
|
export * from "./roles/mod.ts";
|
||||||
export * from "./channels/swapChannels.ts";
|
export * from "./templates/mod.ts";
|
||||||
export * from "./channels/updateVoiceState.ts";
|
export * from "./voice/mod.ts";
|
||||||
|
export * from "./webhooks/mod.ts";
|
||||||
//discovery
|
|
||||||
export * from "./discovery/addDiscoverySubcategory.ts";
|
|
||||||
export * from "./discovery/editDiscovery.ts";
|
|
||||||
export * from "./discovery/getDiscovery.ts";
|
|
||||||
export * from "./discovery/getDiscoveryCategories.ts";
|
|
||||||
export * from "./discovery/removeDiscoverySubcategory.ts";
|
|
||||||
export * from "./discovery/validDiscoveryTerm.ts";
|
|
||||||
|
|
||||||
//emojis
|
|
||||||
export * from "./emojis/createEmoji.ts";
|
|
||||||
export * from "./emojis/deleteEmoji.ts";
|
|
||||||
export * from "./emojis/editEmoji.ts";
|
|
||||||
export * from "./emojis/emojiUrl.ts";
|
|
||||||
export * from "./emojis/getEmoji.ts";
|
|
||||||
export * from "./emojis/getEmojis.ts";
|
|
||||||
|
|
||||||
//guilds
|
|
||||||
export * from "./guilds/createGuild.ts";
|
|
||||||
export * from "./guilds/deleteGuild.ts";
|
|
||||||
export * from "./guilds/editGuild.ts";
|
|
||||||
export * from "./guilds/editWelcomeScreen.ts";
|
|
||||||
export * from "./guilds/editWidget.ts";
|
|
||||||
export * from "./guilds/getAuditLogs.ts";
|
|
||||||
export * from "./guilds/getAvailableVoiceRegions.ts";
|
|
||||||
export * from "./guilds/getBan.ts";
|
|
||||||
export * from "./guilds/getBans.ts";
|
|
||||||
export * from "./guilds/getGuild.ts";
|
|
||||||
export * from "./guilds/getGuildPreview.ts";
|
|
||||||
export * from "./guilds/getPruneCount.ts";
|
|
||||||
export * from "./guilds/getVanityUrl.ts";
|
|
||||||
export * from "./guilds/getVoiceRegions.ts";
|
|
||||||
export * from "./guilds/getWelcomeScreen.ts";
|
|
||||||
export * from "./guilds/getWidget.ts";
|
|
||||||
export * from "./guilds/getWidgetImageUrl.ts";
|
|
||||||
export * from "./guilds/getWidgetSettings.ts";
|
|
||||||
export * from "./guilds/guildBannerUrl.ts";
|
|
||||||
export * from "./guilds/guildIconUrl.ts";
|
|
||||||
export * from "./guilds/guildSplashUrl.ts";
|
|
||||||
export * from "./guilds/leaveGuild.ts";
|
|
||||||
|
|
||||||
//intergrations
|
|
||||||
export * from "./integrations/deleteIntegration.ts";
|
|
||||||
export * from "./integrations/getIntegrations.ts";
|
|
||||||
|
|
||||||
//interactions
|
|
||||||
export * from "./interactions/commands/batchEditApplicationCommandPermissions.ts";
|
|
||||||
export * from "./interactions/commands/createApplicationCommand.ts";
|
|
||||||
export * from "./interactions/commands/deleteApplicationCommand.ts";
|
|
||||||
export * from "./interactions/commands/deleteInteractionResponse.ts";
|
|
||||||
export * from "./interactions/commands/editApplicationCommandPermissions.ts";
|
|
||||||
export * from "./interactions/commands/editInteractionResponse.ts";
|
|
||||||
export * from "./interactions/commands/getApplicationCommand.ts";
|
|
||||||
export * from "./interactions/commands/getApplicationCommands.ts";
|
|
||||||
export * from "./interactions/commands/getApplicationCommandPermission.ts";
|
|
||||||
export * from "./interactions/commands/getApplicationCommandPermissions.ts";
|
|
||||||
export * from "./interactions/commands/upsertApplicationCommand.ts";
|
|
||||||
export * from "./interactions/commands/upsertApplicationCommands.ts";
|
|
||||||
export * from "./interactions/followups/deleteFollowupMessage.ts";
|
|
||||||
export * from "./interactions/followups/editFollowupMessage.ts";
|
|
||||||
export * from "./interactions/followups/getFollowupMessage.ts";
|
|
||||||
export * from "./interactions/getOriginalInteractionResponse.ts";
|
|
||||||
export * from "./interactions/sendInteractionResponse.ts";
|
|
||||||
|
|
||||||
//invites
|
|
||||||
export * from "./invites/createInvite.ts";
|
|
||||||
export * from "./invites/deleteInvite.ts";
|
|
||||||
export * from "./invites/getChannelInvites.ts";
|
|
||||||
export * from "./invites/getInvite.ts";
|
|
||||||
export * from "./invites/getInvites.ts";
|
|
||||||
|
|
||||||
//members
|
|
||||||
export * from "./members/avatarUrl.ts";
|
|
||||||
export * from "./members/banMember.ts";
|
|
||||||
export * from "./members/editBotNickname.ts";
|
|
||||||
export * from "./members/editMember.ts";
|
|
||||||
export * from "./members/fetchMembers.ts";
|
|
||||||
export * from "./members/getMember.ts";
|
|
||||||
export * from "./members/getMembers.ts";
|
|
||||||
export * from "./members/kickMember.ts";
|
|
||||||
export * from "./members/pruneMembers.ts";
|
|
||||||
export * from "./members/getDmChannel.ts";
|
|
||||||
export * from "./members/unbanMember.ts";
|
|
||||||
|
|
||||||
//messages
|
|
||||||
export * from "./messages/addReaction.ts";
|
|
||||||
export * from "./messages/addReactions.ts";
|
|
||||||
export * from "./messages/deleteMessage.ts";
|
|
||||||
export * from "./messages/deleteMessages.ts";
|
|
||||||
export * from "./messages/editMessage.ts";
|
|
||||||
export * from "./messages/getMessage.ts";
|
|
||||||
export * from "./messages/getMessages.ts";
|
|
||||||
export * from "./messages/getReactions.ts";
|
|
||||||
export * from "./messages/pinMessage.ts";
|
|
||||||
export * from "./messages/publishMessage.ts";
|
|
||||||
export * from "./messages/removeAllReactions.ts";
|
|
||||||
export * from "./messages/removeReaction.ts";
|
|
||||||
export * from "./messages/removeReactionEmoji.ts";
|
|
||||||
export * from "./messages/sendMessage.ts";
|
|
||||||
export * from "./messages/unpinMessage.ts";
|
|
||||||
|
|
||||||
//misc
|
|
||||||
export * from "./misc/editBotProfile.ts";
|
|
||||||
export * from "./misc/editBotStatus.ts";
|
|
||||||
export * from "./misc/getGatewayBot.ts";
|
|
||||||
export * from "./misc/getUser.ts";
|
|
||||||
|
|
||||||
//oauth
|
|
||||||
export * from "./oauth/getApplicationInfo.ts";
|
|
||||||
|
|
||||||
//roles
|
|
||||||
export * from "./roles/addRole.ts";
|
|
||||||
export * from "./roles/createRole.ts";
|
|
||||||
export * from "./roles/deleteRole.ts";
|
|
||||||
export * from "./roles/editRole.ts";
|
|
||||||
export * from "./roles/getRoles.ts";
|
|
||||||
export * from "./roles/removeRole.ts";
|
|
||||||
|
|
||||||
//templates
|
|
||||||
export * from "./templates/createGuildFromTemplate.ts";
|
|
||||||
export * from "./templates/createGuildTemplate.ts";
|
|
||||||
export * from "./templates/deleteGuildTemplate.ts";
|
|
||||||
export * from "./templates/editGuildTemplate.ts";
|
|
||||||
export * from "./templates/getGuildTemplates.ts";
|
|
||||||
export * from "./templates/getTemplate.ts";
|
|
||||||
export * from "./templates/syncGuildTemplate.ts";
|
|
||||||
|
|
||||||
//webhooks
|
|
||||||
export * from "./webhooks/createWebhook.ts";
|
|
||||||
export * from "./webhooks/deleteWebhook.ts";
|
|
||||||
export * from "./webhooks/deleteWebhookMessage.ts";
|
|
||||||
export * from "./webhooks/deleteWebhookWithToken.ts";
|
|
||||||
export * from "./webhooks/editWebhook.ts";
|
|
||||||
export * from "./webhooks/editWebhookMessage.ts";
|
|
||||||
export * from "./webhooks/editWebhookWithToken.ts";
|
|
||||||
export * from "./webhooks/getWebhook.ts";
|
|
||||||
export * from "./webhooks/getWebhooks.ts";
|
|
||||||
export * from "./webhooks/getWebhookMessage.ts";
|
|
||||||
export * from "./webhooks/getWebhookWithToken.ts";
|
|
||||||
export * from "./webhooks/sendWebhook.ts";
|
|
||||||
|
|
||||||
//channels
|
|
||||||
export * from "./channels/createStageInstance.ts";
|
|
||||||
export * from "./channels/updateStageInstance.ts";
|
|
||||||
export * from "./channels/getStageInstance.ts";
|
|
||||||
export * from "./channels/deleteStageInstance.ts";
|
|
||||||
export * from "./voice/connectToVoiceChannel.ts";
|
|
||||||
export * from "./channels/threads/addToThread.ts";
|
|
||||||
export * from "./channels/threads/getActiveThreads.ts";
|
|
||||||
export * from "./channels/threads/getArchivedThreads.ts";
|
|
||||||
export * from "./channels/threads/getThreadMember.ts";
|
|
||||||
export * from "./channels/threads/getThreadMembers.ts";
|
|
||||||
export * from "./channels/threads/joinThread.ts";
|
|
||||||
export * from "./channels/threads/leaveThread.ts";
|
|
||||||
export * from "./channels/threads/removeThreadMember.ts";
|
|
||||||
export * from "./channels/threads/startThreadWithMessage.ts";
|
|
||||||
export * from "./channels/threads/startThreadWithoutMessage.ts";
|
|
||||||
|
|
||||||
//guilds
|
|
||||||
export * from "./guilds/scheduledEvents/createScheduledEvent.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/deleteScheduledEvent.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/editScheduledEvent.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/getScheduledEvent.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/getScheduledEvents.ts";
|
|
||||||
export * from "./guilds/scheduledEvents/getScheduledEventUsers.ts";
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./getApplicationInfo.ts";
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export * from "./addRole.ts";
|
||||||
|
export * from "./createRole.ts";
|
||||||
|
export * from "./deleteRole.ts";
|
||||||
|
export * from "./editRole.ts";
|
||||||
|
export * from "./getRoles.ts";
|
||||||
|
export * from "./removeRole.ts";
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export * from "./createGuildFromTemplate.ts";
|
||||||
|
export * from "./createGuildTemplate.ts";
|
||||||
|
export * from "./deleteGuildTemplate.ts";
|
||||||
|
export * from "./editGuildTemplate.ts";
|
||||||
|
export * from "./getGuildTemplates.ts";
|
||||||
|
export * from "./getTemplate.ts";
|
||||||
|
export * from "./syncGuildTemplate.ts";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./connectToVoiceChannel.ts";
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
export * from "./createWebhook.ts";
|
||||||
|
export * from "./deleteWebhook.ts";
|
||||||
|
export * from "./deleteWebhookMessage.ts";
|
||||||
|
export * from "./deleteWebhookWithToken.ts";
|
||||||
|
export * from "./editWebhook.ts";
|
||||||
|
export * from "./editWebhookMessage.ts";
|
||||||
|
export * from "./editWebhookWithToken.ts";
|
||||||
|
export * from "./getWebhook.ts";
|
||||||
|
export * from "./getWebhookMessage.ts";
|
||||||
|
export * from "./getWebhooks.ts";
|
||||||
|
export * from "./getWebhookWithToken.ts";
|
||||||
|
export * from "./sendWebhook.ts";
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
export * from "./bot.ts";
|
export * from "./gateway/mod.ts";
|
||||||
export * from "./handlers/mod.ts";
|
export * from "./handlers/mod.ts";
|
||||||
export * from "./helpers/mod.ts";
|
export * from "./helpers/mod.ts";
|
||||||
export * from "./rest/mod.ts";
|
export * from "./rest/mod.ts";
|
||||||
export * from "./transformers/mod.ts";
|
export * from "./transformers/mod.ts";
|
||||||
export * from "./types/mod.ts";
|
export * from "./types/mod.ts";
|
||||||
export * from "./util/mod.ts";
|
export * from "./util/mod.ts";
|
||||||
export * from "./gateway/mod.ts";
|
|
||||||
|
export * from "./bot.ts";
|
||||||
|
|||||||
+1
-1
@@ -7,6 +7,6 @@ export * from "./processRateLimitedPaths.ts";
|
|||||||
export * from "./processRequest.ts";
|
export * from "./processRequest.ts";
|
||||||
export * from "./processRequestHeaders.ts";
|
export * from "./processRequestHeaders.ts";
|
||||||
export * from "./rest.ts";
|
export * from "./rest.ts";
|
||||||
|
export * from "./restManager.ts";
|
||||||
export * from "./runMethod.ts";
|
export * from "./runMethod.ts";
|
||||||
export * from "./simplifyUrl.ts";
|
export * from "./simplifyUrl.ts";
|
||||||
export * from "./rest_manager.ts";
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
export * from "./toggles/mod.ts";
|
||||||
|
|
||||||
export * from "./activity.ts";
|
export * from "./activity.ts";
|
||||||
export * from "./application.ts";
|
export * from "./application.ts";
|
||||||
export * from "./applicationCommand.ts";
|
export * from "./applicationCommand.ts";
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export * from "./emoji.ts";
|
||||||
|
export * from "./guild.ts";
|
||||||
|
export * from "./member.ts";
|
||||||
|
export * from "./role.ts";
|
||||||
|
export * from "./ToggleBitfield.ts";
|
||||||
|
export * from "./user.ts";
|
||||||
|
export * from "./voice.ts";
|
||||||
@@ -96,3 +96,11 @@ export interface FileContent {
|
|||||||
/** The name of the file */
|
/** The name of the file */
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** https://discord.com/developers/docs/resources/guild#search-guild-members-query-string-params */
|
||||||
|
export interface SearchMembers {
|
||||||
|
/** Query string to match username(s) and nickname(s) against */
|
||||||
|
query: string;
|
||||||
|
/** Max number of members to return (1-1000). Default: 1 */
|
||||||
|
limit?: number;
|
||||||
|
}
|
||||||
|
|||||||
@@ -976,7 +976,6 @@ export type GatewayDispatchEventNames =
|
|||||||
| "THREAD_UPDATE"
|
| "THREAD_UPDATE"
|
||||||
| "THREAD_DELETE"
|
| "THREAD_DELETE"
|
||||||
| "THREAD_LIST_SYNC"
|
| "THREAD_LIST_SYNC"
|
||||||
| "THREAD_MEMBER_UPDATE"
|
|
||||||
| "THREAD_MEMBERS_UPDATE";
|
| "THREAD_MEMBERS_UPDATE";
|
||||||
|
|
||||||
export type GatewayEventNames = GatewayDispatchEventNames | "READY" | "RESUMED";
|
export type GatewayEventNames = GatewayDispatchEventNames | "READY" | "RESUMED";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GatewayManager } from "../gateway/gateway_manager.ts";
|
import { GatewayManager } from "../gateway/gatewayManager.ts";
|
||||||
|
|
||||||
export function calculateShardId(gateway: GatewayManager, guildId: bigint) {
|
export function calculateShardId(gateway: GatewayManager, guildId: bigint) {
|
||||||
if (gateway.maxShards === 1) return 0;
|
if (gateway.maxShards === 1) return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user