MCPcopy Index your code
hub / github.com/barthofu/tscord

github.com/barthofu/tscord @v2.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.5 ↗ · + Follow
378 symbols 993 edges 124 files 28 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img height="450" src="https://github.com/barthofu/tscord/assets/66025667/7cf87e0f-37e9-46ce-b244-dda6c45941c9"></img>

Latest version

Build state Repo size Stars count

# What is TSCord #### **TSCord** is a fully-featured **[discord bot](https://discord.com/developers/docs/intro#bots-and-apps)** *template* written in [Typescript](https://www.typescriptlang.org/), intended to provide a framework that's easy to use, extend and modify. It uses [`discordx`](https://github.com/discordx-ts/discordx) and [`discord.js v14`](https://github.com/discordjs/discord.js) under the hood to simplify the development of discord bots. This template was created to give developers a starting point for new Discord bots, so that much of the initial setup can be avoided and developers can instead focus on meaningful bot features. Developers can simply follow the [installation](https://tscord.bartho.dev/docs/bot/get-started/installation) and the [configuration](https://tscord.bartho.dev/docs/bot/get-started/configuration) instructions, and have a working bot with many boilerplate features already included!
Getting started is as easy as one command
npx tscord init bot my-bot
**[To know how to use TSCord and all its components, check the documentation here](https://tscord.bartho.dev/)** ㅤ

But TSCord is not only a Discord bot template...

### [Dashboard](https://github.com/barthofu/tscord-dashboard) A ready-to-use fancy dashboard for your TSCord bot ### [Website](https://github.com/barthofu/tscord-website) Customizable static homepage for your TSCord-based bot https://user-images.githubusercontent.com/66025667/184621486-7340157f-b7fc-44ea-94a9-03d76a99384c.mp4
### [CLI](https://github.com/barthofu/tscord-cli) Really useful CLI meant to initialize a new TSCord project, generate files by type or even manage plugins https://user-images.githubusercontent.com/66025667/196367258-94c77e23-779c-4d9b-8583-a29226435b07.mp4 ### [Plugins](https://github.com/barthofu/tscord-plugins) Fully extensible thanks to the plugin eco-system
<a href="https://discord.gg/GsYF4xceZZ" target="_blank">
    <img width="17.5%" src="https://user-images.githubusercontent.com/66025667/196373934-2fad8760-a58d-4b4d-ad64-b069baa71823.png"></img>
</a>

📜 Features

Talking about features, here are some of the core features of the template:

  • Advanced handlers for:
    • Interactions (slash, context menu, button, modal, select menu, etc)
    • Simple message commands
    • Discord events listeners
  • Guards functions, acting like middlewares on handlers with some built-ins:
    • Rate limiter
    • Maintenance mode
    • Disabling command
    • Guild only command (no DMs)
    • NSFW only command
    • Message's content match using regex
  • Internal API to interact with the bot from external services, with built-in useful endpoints
  • Multiple databases support out-of-the-box using Mikro-ORM
  • Migrations system to keep a safe database
  • Custom events handlers
  • Advanced error handler
  • Fully-typed localization (i18n)
  • Local store to manage global state through the app
  • Advanced logger with log files and discord channels support
  • Scheduler for cron jobs
  • Built-in rich statistics system
  • Automatic static assets upload to imgur

This template is also developer friendly and follow strict design patterns to ease its maintenance: - Written in Typescript - Built around the Dependency Injection and Singleton patterns - HMR on events and commands for a faster development - Use of battle-tested libraries under the hood (discordx and discord.js) - Linting and formatting thanks to a top-notch ESLint config - Typesafe and validated environment variables - Built-in debugging setup for VSCode - Support for running with the PM2 process manger - Support for running with Docker - CI/CD integration with Github Actions

and many more!

📚 Documentation

Check the official documentation to get started and understand how to use this template.

You can also find useful documentations at: - discordx documentation - Discord.js Guide - Discord's developer portal

📢 Support

If you need support on the template or just want to exchange with us, don't hesitate to join the official Discord support server!

Roadmap

We use Github milestones for

Click here to access the milestone roadmap

📑 License

MIT License

Copyright (c) barthofu

Core symbols most depended-on inside this repo

get
called by 37
src/services/Database.ts
resolveDependency
called by 28
src/utils/functions/dependency.ts
console
called by 20
src/services/Logger.ts
log
called by 20
src/services/Logger.ts
countStatsPerDays
called by 14
src/services/Stats.ts
numberAlign
called by 11
src/utils/functions/string.ts
Service
called by 11
src/utils/decorators/Service.ts
setOptionsLocalization
called by 9
src/utils/functions/localization.ts

Shape

Method 184
Class 103
Function 90
Enum 1

Languages

TypeScript100%

Modules by API surface

src/utils/classes/Plugin.ts20 symbols
src/services/Stats.ts20 symbols
src/services/Logger.ts18 symbols
src/api/controllers/bot.ts16 symbols
src/services/PluginsManager.ts13 symbols
src/services/Database.ts13 symbols
src/api/controllers/stats.ts11 symbols
src/utils/functions/resolvers.ts9 symbols
src/api/controllers/health.ts9 symbols
src/services/Scheduler.ts8 symbols
src/services/ImagesUpload.ts8 symbols
src/commands/General/help.ts8 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add tscord \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact