https://github.com/burakbehlull/discord-bot-typescript
A discord bot infrastructure written in typescript. Discord Typescript Bot Template.
https://github.com/burakbehlull/discord-bot-typescript
discord-bot discord-bot-template discord-bot-template-ts discord-bot-typescript discord-prefix discord-slash-commands discord-ts discord-ts-bot discordjs-bot ts-node
Last synced: 5 months ago
JSON representation
A discord bot infrastructure written in typescript. Discord Typescript Bot Template.
- Host: GitHub
- URL: https://github.com/burakbehlull/discord-bot-typescript
- Owner: burakbehlull
- License: apache-2.0
- Created: 2024-06-30T17:29:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-17T17:42:43.000Z (6 months ago)
- Last Synced: 2025-06-17T17:47:07.400Z (6 months ago)
- Topics: discord-bot, discord-bot-template, discord-bot-template-ts, discord-bot-typescript, discord-prefix, discord-slash-commands, discord-ts, discord-ts-bot, discordjs-bot, ts-node
- Language: TypeScript
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discordjs Bot Typescript
> Run: **npm run dev** or **yarn dev**
| Command | Comment |
| ------ | ------ |
| npm start | Runs discord bot |
| npm run deploy | deploy slash command loads to discord bot |
Fill in the ` .env ` file within the project with your information:
```
TOKEN =
BOT_ID =
PREFIX =
```
Usages:
```js
// one way
const Hello : ITypes.ISlashCommand = {}
export default Hello
// two way
export default {} as ITypes.ISlashCommand
```
### contents:
* events loader
* slash commands loader
* prefix commands loader
* deploy command
* defined types
### type usages:
| type | comment | meets | use |
| ------ | ------ | ------ | ------ |
| **IClient** | Bot launch client | .. | use so; client: IClient |
| **IPrefixCommand** | Used for prefix commands | name, execute | {name: "exampleCommand"} as IPrefixCommand |
| **PrefixCommandArgs** | Is a type given to command values | client, message, args | execute({client, message, args} : PrefixCommandArgs){} |
| **ISlashCommand** | Used for slash commands | data, execute | {name: "exampleCommand"} as ISlashCommand |
| **SlashCommandArgs** | Is a type given to command values | client, interaction | execute({client, interaction} : SlashCommandArgs){} |
| **IEvent** | A type given to event files | name, once, execute | IEvent |