fix: removes store channels

This commit is contained in:
Skillz4Killz
2022-03-31 13:50:19 +00:00
committed by GitHub
parent bcaa43ab7d
commit 167bc73d75
3 changed files with 11 additions and 10 deletions

View File

@@ -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

View File

@@ -18,7 +18,6 @@ export function sendMessage(bot: BotWithCache) {
channel &&
[
ChannelTypes.GuildCategory,
ChannelTypes.GuildStore,
ChannelTypes.GuildStageVoice,
].includes(channel.type)
) {

View File

@@ -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 */