Releases: barthofu/tscord
v2.3
TSCord template v2.3
This is the changelog, you can see the migration guide from the v2.2
here.
This update mainly focus on 3 things:
- developer experience
- refactoring and cleaning the codebase
- keeping the dependencies and ecosystem up to date
Warning
If you want to see the changes coming alongside this PR, check commit per commit because we've ran the new code formater and it has changed by default the style of nearly all the files.
Features
- HMR (Hot Module Replacement) on commands and events files (#131)
- Logs auto-archiving and retention policies (#143)
- Linting and formatting through an eslint config using
antfu/eslint-config
as base (#128) - Lint stage in github actions workflows
- Environment variables validation (#130)
- Created wrapper
@Service
decorator for@singleton
, which can take akeepInstanceAfterHmr
parameter in order to keep the instance state between HMR reloads (e.g:Store
service) - Created wrappers
@Injectable
and@AutoInjectable
of respectively@injectable
and@autoInjectable
to uniformize names and import source (@/decorators
instead oftsyringe
) - Type
discordx
client config in thesrc/client.ts
file (6f83ffb)
Refactor
- Switching back from
swc
totsc
in order to improve stability at the cost of little speed deperdition (#135) - Renamed all internal path aliases from
@<module_name>
to@/<module_name>
(e.g:@services
->@/services
) - Remove useless
botOnline
api middleware HTTP request (8060043) - Remove useless websocket client and all related events by switching them to REST endpoints for the dashboard (8db5d31)
- Remove all
eval
from the code, for security concerns (60baa42) - Remove undesired
typesafe-i18n
logs at startup (c570dde)
Bug fixes
isJSONEncodable isn't a function at startup
(65338ea)- Plugins can't import intents from client config (add934f - @Mr-Artemus)
Chores
- Update to node v20.11 (LTS)
- Update dependencies
v2.2
TSCord template v2.2
This is the changelog, you can see the migration guide from the v2.1
here.
Bug fixes
- Plugins (#119)
- Not working at all due to semver compliance (resolved using coercing)
- Translation nested paths type not working with plugins
- Database
get
method returnsany
(#120) - i18n windows path separator not supported
Chores
- Update deps
v2.1
TSCord template v2.1
This is the changelog, you can see the migration guide from the v2.0
here.
Features
- Config option to toggle on/off the automated defering (#113)
templateReady
custom event (#90)- Ukrainian and Russian translations (#94) thanks to @DMSavchik
- Default localized command description (#89)
- Improved
/help
command (#117)
Bug fixes
- Authentication API middleware errors (#91)
- API endpoints exposed even w/ invalid oauth2 token (#91)
botOnline
middleware erroring with ipv6- Better handling of mikro-orm global identity issues (#100)
Refactors
- Split discord events and custom events apart (#103)
- Make use of the new typescript 4.9
satisfies
operator in configs (#96)
Chores
- Update deps
v2.0
🎉 TSCord template v2.0 🎉
With this version, TSCord is no longer a simple bot template, but a whole ecosystem that will enhance the experience of both developers and users!
Indeed, we can finally and proudly announce the release of 4 major components in the TSCord project:
- Plugins: it is now finally possible to actually extend the base of TSCord through plugins.
- Static website: give your bot a beautiful landing page with key information on it (features, stats, commands, articles, etc). It is built using Next.js as a full static website and is totally SEO friendly.
- Dashboard: you want to monitor all your bots in real time, see statistics, manage guilds or database backups? The TSCord dashboard is here for you!
- CLI: the brand new CLI will permit you to initialize a new TSCord project, manage plugins and generate template files.
Plus, the documentation is finally done and stable!
Don't hesitate to make PRs in order to improve it 😉 (the repo is here)
New features
- Switch the api from
@discordx/koa
totsed
for a better DX and in order to have a Swagger UI page - New endpoints:
/
: check if the API is running/stats/guilds/last
/docs
: Swagger UI page (to watch in a browser)
- Send automatically handled errors to discord
- Full support of Slash groups and subcommands
- Add a
.getByTags()
method the Image custom repository to easily find images by tags - Add a lot of native discord events thanks to androz2091/discord-logs
- Add
.kill()
method toBaseError
class which stops the bot process when called
Enhancements
- Switch typescript compiler from
tsc
toswc
in order to gain -50% build/dev run time! - Bump dependencies versions
- Change of some endpoints routes in the API to follow the Open API specs
- Switch from
sqlite
tobetter-sqlite
for the default database driver - Abstraction of the database type
- All the boilerplate code of the template is now localized
- Full support and optional usefull abstractions of
nameLocalizations
anddescriptionLocalizations
in decorators (such as@Slash()
,@ContextMenu()
, etc) - Assets are now uploaded recursively
- Beautify and customize discord channel logs
- Add typings to
resolveDependencies
Fixes
- Handle wrong behaviors of imgur assets upload
- Switch to
.fetch
for discord.js cache interaction when possible - Remove auto-defer for MessageComponents
- API server and WebSocket client are now optional and disabled by default
Refactors
- Rename
serve
npm script tostart
- Rename method
<Database>.getRepo()
to<Database>.get()
- Rename
waitForDependency
andwaitForDependencies
toresolveDependency
andresolveDependencies
Auto-generated changelogs
What's Changed
- chore(deps): bump file-type from 16.5.3 to 16.5.4 by @dependabot in #8
- Feat/dependency by @Mr-Artemus in #9
- feat(#19): switch from
tsc
toswc
by @barthofu in #21 - chore(deps): bump undici from 5.8.0 to 5.9.1 by @dependabot in #23
- refactor(#22): update
discordx
to11.1.8
by @barthofu in #26 - fix(#24): handle invalid imgur
client_id
by @barthofu in #27 - fix(#20):
validator
middleware returns400
res by @barthofu in #28 - feat(#29):
/
endpoint to check if API is running by @barthofu in #30 - fix(#32): auto inject client in handlers by @barthofu in #33
- feat(#31): switch to
.fetch
for cache interaction when possible by @Mr-Artemus in #35 - fix(#36): remove auto-defer for MessageComponents by @Mr-Artemus in #37
- feat(#38): abstraction of the database type by @barthofu in #40
- fix(#39): switch from
sqlite
tobetter-sqlite
on mikro-orm by @barthofu in #41 - 13 feature send handled errors to discord by @Mr-Artemus in #42
- chore(deps): bump moment-timezone from 0.5.34 to 0.5.37 by @dependabot in #44
- Feat/translation by @barthofu in #45
- feat(#43): full support of slash groups and subcommands by @barthofu in #46
- feat(#49): api and websocket servers optional by @barthofu in #50
- feat(#57): recursive upload of assets by @barthofu in #62
- fix(#60): prevent logger to send to discord if the bot is not up by @Mr-Artemus in #63
- fix(#58): intents causing infinite error loop by @barthofu in #64
- feat(#59): disable discord error logs in dev mode by @barthofu in #65
- 14 feature beautify discord channel logs by @Mr-Artemus in #69
- fix: patch missing whitespace by @airone01 in #67
- 71 feature getbytags custom image entity method by @Mr-Artemus in #72
- chore(#70): update
discordx
to v11.2.0
by @barthofu in #74 - chore(deps): update libraries by @barthofu in #79
- feat(#80): switch from
routing-controllers
totsed
by @barthofu in #82 - 73 feature plugins by @Mr-Artemus in #83
New Contributors
Full Changelog: v1.1.0...v2.0.0
v1.1
What's Changed
- chore(deps): bump file-type from 16.5.3 to 16.5.4 by @dependabot in #8
- Feat/dependency by @Mr-Artemus in #9
- feat(#19): switch from
tsc
toswc
by @barthofu in #21 - chore(deps): bump undici from 5.8.0 to 5.9.1 by @dependabot in #23
- refactor(#22): update
discordx
to11.1.8
by @barthofu in #26 - fix(#24): handle invalid imgur
client_id
by @barthofu in #27 - fix(#20):
validator
middleware returns400
res by @barthofu in #28 - feat(#29):
/
endpoint to check if API is running by @barthofu in #30 - fix(#32): auto inject client in handlers by @barthofu in #33
- feat(#31): switch to
.fetch
for cache interaction when possible by @Mr-Artemus in #35 - fix(#36): remove auto-defer for MessageComponents by @Mr-Artemus in #37
- feat(#38): abstraction of the database type by @barthofu in #40
- fix(#39): switch from
sqlite
tobetter-sqlite
on mikro-orm by @barthofu in #41 - 13 feature send handled errors to discord by @Mr-Artemus in #42
- chore(deps): bump moment-timezone from 0.5.34 to 0.5.37 by @dependabot in #44
- Feat/translation by @barthofu in #45
- feat(#43): full support of slash groups and subcommands by @barthofu in #46
- feat(#15):
info
command by @barthofu in #47
New Contributors
- @Mr-Artemus made their first contribution in #9
Full Changelog: v1.0.0...v1.1.0