Skip to content

Commit

Permalink
Update to discord.js v13 (#12)
Browse files Browse the repository at this point in the history
* Update packages
* Replace discord.js-light with discord.js
* Fixes for discord.js v13
* Fix broadcastEval's
* Update README
* Disable commonly unused caches
  • Loading branch information
KevinNovak committed Aug 14, 2021
1 parent 34acea7 commit d618e31
Show file tree
Hide file tree
Showing 42 changed files with 514 additions and 341 deletions.
5 changes: 2 additions & 3 deletions README.md
@@ -1,6 +1,6 @@
# Discord Bot TypeScript Template

[![discord.js-light](https://img.shields.io/github/package-json/dependency-version/KevinNovak/Discord-Bot-TypeScript-Template/discord.js-light)](https://github.com/timotejroiko/discord.js-light)
[![discord.js](https://img.shields.io/github/package-json/dependency-version/KevinNovak/Discord-Bot-TypeScript-Template/discord.js)](https://discord.js.org/)
[![License](https://img.shields.io/badge/license-MIT-blue)](https://opensource.org/licenses/MIT)

**Discord bot** - A discord.js bot template written with TypeScript.
Expand All @@ -25,8 +25,7 @@ For help using this template, feel free to [join our support server](https://dis
### Developer Friendly:

- Written with TypeScript.
- Uses the [discord.js-light](https://github.com/timotejroiko/discord.js-light) framework.
- Based on [discord.js](https://discord.js.org/), but more memory efficient.
- Uses the [discord.js](https://discord.js.org/) framework.
- Built-in debugging setup for VSCode.
- Support for running with the [PM2](https://pm2.keymetrics.io/) process manger.
- Support for running with [Docker](https://www.docker.com/).
Expand Down
22 changes: 10 additions & 12 deletions config/config.example.json
Expand Up @@ -9,20 +9,18 @@
"DIRECT_MESSAGES",
"DIRECT_MESSAGE_REACTIONS"
],
"disabledEvents": [],
"partials": ["MESSAGE", "CHANNEL", "REACTION"],
"caches": {
"guilds": true,
"roles": true,
"emojis": false,
"channels": true,
"overwrites": true,
"presences": false,
"messages": {
"size": 0,
"lifetime": 0,
"sweepInterval": 0
}
"BaseGuildEmojiManager": 0,
"GuildBanManager": 0,
"GuildInviteManager": 0,
"GuildStickerManager": 0,
"MessageManager": 0,
"PresenceManager": 0,
"StageInstanceManager": 0,
"ThreadManager": 0,
"ThreadMemberManager": 0,
"VoiceStateManager": 0
}
},
"api": {
Expand Down
2 changes: 1 addition & 1 deletion lang/lang.en-Pirate.json
Expand Up @@ -78,7 +78,7 @@
"**Node.js**: {{NODE_VERSION}}",
"**TypeScript**: {{TS_VERSION}}",
"**ECMAScript**: {{ES_VERSION}}",
"**discord.js-light**: {{DJS_VERSION}}"
"**discord.js**: {{DJS_VERSION}}"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion lang/lang.en-US.json
Expand Up @@ -78,7 +78,7 @@
"**Node.js**: {{NODE_VERSION}}",
"**TypeScript**: {{TS_VERSION}}",
"**ECMAScript**: {{ES_VERSION}}",
"**discord.js-light**: {{DJS_VERSION}}"
"**discord.js**: {{DJS_VERSION}}"
]
},
{
Expand Down

1 comment on commit d618e31

@scottbucher
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In src/utils/shard-utils.ts you have:

        return Math.ceil(
            await Util.fetchRecommendedShards(token, { guildsPerShard: serversPerShard })
        );

But with the greatest pull request to ever touch discord.js the shard count is already ceiled.

Please sign in to comment.