This is a typescript template for Discord Bots built in DiscordJS.
- Discord.JS v14
- Uses functions and ESM modules instead of classes
- VSCode Extension
- Command Handler
- Context Menu Handler
- Event Handler
- Button handler
- Modal handler
- Select Menu Handler
- Supports Discord.JS v14 (not v13)
- discord-api-types
- Slash Commands
- Embeds
- Buttons
- Selection menus
- Context menus
- Modals
- Events
- Collections
git clone https://github.com/ana-log/analog-ts.git
cd analog-ts
npm i
- Copy
.env.example
and paste it in the main directory - Rename it to just
.env
- Put your bot token in
TOKEN=
- Example
TOKEN=239ung2389g-0n2q9gjn20-g98n293838h9wg2a-awjj
- To start the bot do ↓
npm start
- Open up 2 Terminals in VS Code (or your IDE of choice)
- First terminal do
npm run watch
- Second terminal do
npm run dev
This should restart the bot everytime you make a code change <
**MAKE SURE `registerCmd` IN `devconfig.ts` IS SET TO FALSE WHILE IN DEV MODE, OTHERWISE DISCORD WILL RATELIMIT YOU!** ## Bots using Analog.ts - [S.I.M.P.S Discord bot](https://github.com/simpsmc/discordbot) - [Observer-Bot-TS](https://github.com/ComparatorCraftSMP/observer-bot-ts)