Skip to content

Commit

Permalink
Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
D4isDAVID committed Sep 14, 2024
1 parent dbfb8a1 commit 685c1e1
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 491 deletions.
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
BOT_TOKEN='YOUR_BOT_TOKEN_HERE'

# Can be kept empty to use Discord's recommended shard count
BOT_SHARD_COUNT=
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 David Malchin
Copyright (c) 2024 David Malchin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
39 changes: 2 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,10 @@
# Discord.js Components Bot
# Qbot

This is a [discord.js] bot template with a components system.
It is written in [TypeScript], and uses [`@discordjs/core`][@discordjs/core].
A custom Discord bot for Qbox's Discord server.

Out of the box, the template only adds a ping and some example commands.
Database support is also not included by default, and can be manually added.

- [Key Features](#key-features)
- [Configuration](#configuration)
- [Scripts](#scripts)

## Key Features

### Components System

Typically when developing Discord bots, we place handlers, events, commands,
interactions, etc. into their own respective folders.

The components system creates a more organized way to store all related
events, commands and other interactions in their own folder
([see components](./src/components/)).

### Interaction Utilities

The template comes with interaction utilities, allowing you to handle user
input with ease ([see example](./src/components/example/modal.ts)).

### Subcommand Utilities

The template comes with subcommand utilities, allowing you to create commands
with subcommands and subcommand groups with ease
([see example](./src/components/example/commands/subcommands.ts)).

### Stateful Interactions

The template comes with stateful modals & message components, allowing you to
handle simple state between interactions with ease
([see example](./src/components/example/stateful/stateful-modal.ts)).

## Configuration

- Make a copy of the [`.env.example`](./.env.example) file
Expand All @@ -52,7 +19,5 @@ handle simple state between interactions with ease
- `npm run deploy` - Deploy commands to Discord
- `npm run start` - Start your bot

[discord.js]: https://discord.js.org
[@discordjs/core]: https://discord.js.org/docs/packages/core
[prettier]: https://prettier.io
[typescript]: https://typescriptlang.org
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"@discordjs/ws": "^2.0.0"
},
"devDependencies": {
"@types/node": "^22.5.2",
"@types/node": "^22.5.5",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"tsc-alias": "^1.8.10",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
}
}
1 change: 0 additions & 1 deletion src/components/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Components

- [`core/`](./core/) - core features
- [`example/`](./example/) - an example component
- [`ping/`](./ping/) - ping command
- [`loader.ts`](./loader.ts) - code to load components
- [`types.d.ts`](./types.d.ts) - typings used by components
31 changes: 0 additions & 31 deletions src/components/example/commands/chat-input-command.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/example/commands/message-command.ts

This file was deleted.

63 changes: 0 additions & 63 deletions src/components/example/commands/subcommands.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/components/example/commands/user-command.ts

This file was deleted.

33 changes: 0 additions & 33 deletions src/components/example/index.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/example/message-components/button.ts

This file was deleted.

27 changes: 0 additions & 27 deletions src/components/example/message-components/channel-select.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/components/example/message-components/mentionable-select.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/components/example/message-components/role-select.ts

This file was deleted.

Loading

0 comments on commit 685c1e1

Please sign in to comment.