-
-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
BLAPI does not post through the handle function on start when using traditional sharding. It is unclear how one is meant to use BLAPI with traditional sharding. Am I meant to use manualPost, and if so, can an example be provided?
To Reproduce
Steps to reproduce the behavior:
- Create a bot which uses traditional sharding (using Discord.js ShardingManager in index.ts file)
// index.ts
const manager = new ShardingManager('./dist/bot.js', { token: process.env.DISCORD_TOKEN, totalShards: 3 });- Put BLAPI in the bot.ts file (not the main index.ts file)
// bot.ts
import { Client } from 'discord.js';
import { handle, setLogging } from 'blapi';
const client = new Client();
await client.login(process.env.DISCORD_TOKEN);
const botListAPIKeys = {
'voidbots.net': process.env.VOIDBOTS_KEY
};
setLogging({
extended: true,
logger: logger
});
await handle(client, botListAPIKeys);- Run code
- Observe an error is outputted.
BLAPI: Error [ShardingInProcess]: Shards are still being spawned.
Expected behavior
BLAPI posts to bot lists without any issues.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request