tscord

🤖 A fully-featured discord bot template written in Typescript, intended to provide a framework that's easy to use, extend and modify

MIT License

Stars
247
Committers
7

Bot releases are hidden (Show)

tscord - Latest Release

Published by barthofu 8 months ago

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 a keepInstanceAfterHmr 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 of tsyringe)
  • Type discordx client config in the src/client.ts file (https://github.com/barthofu/tscord/commit/6f83ffb040cb3fd1cf4a6272e7870d5e28e1b380)

Refactor

Bug fixes

Chores

  • Update to node v20.11 (LTS)
  • Update dependencies
tscord -

Published by barthofu over 1 year ago

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 returns any (#120)
  • i18n windows path separator not supported

Chores

  • Update deps
tscord -

Published by barthofu over 1 year ago

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

Published by barthofu almost 2 years ago

🎉 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 to tsed 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 to BaseError class which stops the bot process when called

Enhancements

  • Switch typescript compiler from tsc to swc 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 to better-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 and descriptionLocalizations 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 to start
  • Rename method <Database>.getRepo() to <Database>.get()
  • Rename waitForDependency and waitForDependencies to resolveDependency and resolveDependencies

Auto-generated changelogs

What's Changed

New Contributors

Full Changelog: https://github.com/barthofu/tscord/compare/v1.1.0...v2.0.0

tscord - v1.1

Published by barthofu about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/barthofu/tscord/compare/v1.0.0...v1.1.0

tscord - v1.0

Published by barthofu over 2 years ago