Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
meister03 committed Apr 28, 2021
2 parents 438a48d + 1a69e45 commit 0d9a078
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# - name: Install dependencies and build, if needed
# run: npm ci && npm run build
- name: Semantic Release
uses: cycjimmy/[email protected]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4 changes: 2 additions & 2 deletions ClusterManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class ClusterManager extends EventEmitter {
*/
async spawn(amount = this.totalShards, delay = 5500, spawnTimeout) {
if (amount === 'auto') {
amount = await Discord.fetchRecommendedShards(this.token);
amount = await Discord.fetchRecommendedShards(this.token, 1000);
} else {
if (typeof amount !== 'number' || isNaN(amount)) {
throw new TypeError('CLIENT_INVALID_OPTION', 'Amount of internal shards', 'a number.');
Expand Down Expand Up @@ -296,4 +296,4 @@ Object.defineProperty(Array.prototype, 'chunk', {
R.push(this.slice(i, i + chunkSize));
return R;
}
});
});
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Discord-Hybrid-Sharding
The first package which combines Sharding Manager & Internal Sharding to save a lot of resources!

Aka: "Mixing both: if you need `x` shards for `n` process"

## Why?
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "discord-hybrid-sharding",
"version": "1.0.6",
"version": "1.0.7",
"description": "The first package which combines Sharding Manager & Internal Sharding to save a lot of ressources",
"main": "index.js",
"types": "./typings.d.ts",
Expand All @@ -12,7 +12,9 @@
"type": "git",
"url": "git+https://github.com/meister03/discord-hybrid-sharding.git"
},

"publishConfig": {
"access": "public"
},
"keywords": [
"discord",
"discord.js",
Expand Down

0 comments on commit 0d9a078

Please sign in to comment.