mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 00:10:07 +00:00
fix: removes store channels
This commit is contained in:
@@ -97,8 +97,19 @@ export async function handleOnMessage(gateway: GatewayManager, message: any, sha
|
||||
|
||||
// Important for RESUME
|
||||
if (messageData.t === "READY") {
|
||||
// Wait few seconds to spawn next shard
|
||||
const bucket = gateway.buckets.get(shardId % gateway.maxConcurrency);
|
||||
if (bucket?.createNextShard.length) {
|
||||
// await delay(gateway.spawnShardDelay);
|
||||
// setTimeout(() => {
|
||||
console.log("shifting to create new shard");
|
||||
bucket.createNextShard.shift()?.();
|
||||
// }, gateway.spawnShardDelay);
|
||||
}
|
||||
|
||||
const shard = gateway.shards.get(shardId);
|
||||
const payload = messageData.d as DiscordReady;
|
||||
|
||||
if (shard) {
|
||||
shard.sessionId = payload.session_id;
|
||||
shard.ready = true;
|
||||
@@ -108,13 +119,6 @@ export async function handleOnMessage(gateway: GatewayManager, message: any, sha
|
||||
|
||||
gateway.loadingShards.get(shardId)?.resolve(true);
|
||||
gateway.loadingShards.delete(shardId);
|
||||
// Wait few seconds to spawn next shard
|
||||
const bucket = gateway.buckets.get(shardId % gateway.maxConcurrency);
|
||||
if (bucket?.createNextShard.length) {
|
||||
setTimeout(() => {
|
||||
bucket.createNextShard.shift()?.();
|
||||
}, gateway.spawnShardDelay);
|
||||
}
|
||||
}
|
||||
|
||||
// Update the sequence number if it is present
|
||||
|
||||
@@ -18,7 +18,6 @@ export function sendMessage(bot: BotWithCache) {
|
||||
channel &&
|
||||
[
|
||||
ChannelTypes.GuildCategory,
|
||||
ChannelTypes.GuildStore,
|
||||
ChannelTypes.GuildStageVoice,
|
||||
].includes(channel.type)
|
||||
) {
|
||||
|
||||
@@ -270,8 +270,6 @@ export enum ChannelTypes {
|
||||
GuildCategory,
|
||||
/** A channel that users can follow and crosspost into their own server */
|
||||
GuildNews,
|
||||
/** A channel in which game developers can sell their game on Discord */
|
||||
GuildStore,
|
||||
/** A temporary sub-channel within a GUILD_NEWS channel */
|
||||
GuildNewsThread = 10,
|
||||
/** A temporary sub-channel within a GUILD_TEXT channel */
|
||||
|
||||
Reference in New Issue
Block a user