Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlustre/discordjs-typescript-template
Simple TypeScript + Discord.js template so you can start making your Discord bot with ease
https://github.com/dlustre/discordjs-typescript-template
discord discord-bot discord-js discord-js-template discord-js-typescript discordjs discordjs-bot discordjs-bot-template discordjs-typescript t3 typescript
Last synced: about 1 month ago
JSON representation
Simple TypeScript + Discord.js template so you can start making your Discord bot with ease
- Host: GitHub
- URL: https://github.com/dlustre/discordjs-typescript-template
- Owner: dlustre
- Created: 2024-06-23T13:28:45.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-24T10:57:50.000Z (6 months ago)
- Last Synced: 2024-10-13T02:41:54.517Z (2 months ago)
- Topics: discord, discord-bot, discord-js, discord-js-template, discord-js-typescript, discordjs, discordjs-bot, discordjs-bot-template, discordjs-typescript, t3, typescript
- Language: TypeScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Discord.js TypeScript Template
A simple TypeScript + Discord.js template so you can start making your Discord bot with ease. It does all the preliminary setup for you, so you basically only need to create the bot and hit start to get it running! This template is intended for those who just want to make a basic bot or need the flexibility to customize it to their needs.
*(Looking for something more advanced, batteries-included? Check out [Discord-Bot-TypeScript-Template](https://github.com/KevinNovak/Discord-Bot-TypeScript-Template).)*
If you haven't already, read the [Discord.js Guide](https://discordjs.guide/). It does a good job of demonstrating what you can do with Discord.js.
## Getting Started
### 1. Create a new Discord bot with at least the following scopes and permissions. You can do this in the installation tab of the [Discord Developer Portal](https://discord.com/developers/applications). Afterwards, you can install the bot in your server.
![Default scopes and permissions](docs/install-settings.png)
### 2. Clone the repository or use it as a template.
```sh
git clone https://github.com/dlustre/discordjs-typescript-template.git
```### 3. Create a `.env` file in the root of the project and add your bot token and client ID. Your bot token and client ID can be found in the [Discord Developer Portal](https://discord.com/developers/applications) and navigating to the "Bot" tab and the "OAuth2" tab.
```env
# .env
TOKEN=
CLIENT_ID=
```### 4. Install dependencies
#### npm
```sh
npm install
```#### pnpm
```sh
pnpm install
```#### yarn
```sh
yarn install
```### 5. Run the bot and try /ping in your server!
#### npm
```sh
npm start
```#### pnpm
```sh
pnpm start
```#### yarn
```sh
yarn start
```## Commands
The bot comes with a few commands to get you started. You can add your own commands within the `commands` directory.
## Contributing
If you have any suggestions or improvements, feel free to contribute!