Compare commits

..

2 Commits

Author SHA1 Message Date
fe139004bf bufix: added missing import 2024-03-03 17:13:59 +01:00
3563e5be62 download & install instructions 2024-03-03 17:08:47 +01:00
2 changed files with 37 additions and 4 deletions

View File

@ -1,4 +1,34 @@
# Getting started # Setup
## Requirements
- NodeJS (LTS; including NPM): https://nodejs.org/en/download/
- Git: https://git-scm.com/downloads
## Download
Download the current source code [here](https://git.baipyr.us/Baipyrus/DiscordJS-Example/archive/main.zip).
Or clone the repository manually:
```bash
git clone https://git.baipyr.us/Baipyrus/DiscordJS-Example.git
```
## Installation
Install the required dependencies:
```bash
npm install
```
## Running
Start the bot with:
```bash
npm run start
```
# Usage
Discord utilizes different types of commands to interface with bots. The following explanations aim to explain these types. Discord utilizes different types of commands to interface with bots. The following explanations aim to explain these types.
@ -117,6 +147,7 @@ Full names:
- `/custom_vc create` - `/custom_vc create`
Description: Description:
The bot creates a new voice channel with the given name and registers said channel for custom VC creation The bot creates a new voice channel with the given name and registers said channel for custom VC creation
Options: Options:
@ -130,11 +161,12 @@ Full names:
- `/custom_vc register` - `/custom_vc register`
Description: Description:
Fetches any existing voice channel and registers it for custom VC creation directly Fetches any existing voice channel and registers it for custom VC creation directly
Options: Options:
- \_id: Discord Channel ID - \_channel: Discord Channel
### remove ### remove
@ -143,11 +175,12 @@ Full names:
- `/custom_vc remove` - `/custom_vc remove`
Description: Description:
Fetches any voice channel, looks if it is registered for custom VC creation and then unregisters it Fetches any voice channel, looks if it is registered for custom VC creation and then unregisters it
Options: Options:
- \_id: Discord Channel ID - \_channel: Discord Channel
## Automated tasks ## Automated tasks

View File

@ -1,5 +1,5 @@
import { ChatInputCommandInteraction, ContextMenuCommandInteraction, Role } from 'discord.js'; import { ChatInputCommandInteraction, ContextMenuCommandInteraction, Role } from 'discord.js';
import { Message, RoleEmojiPair } from './database.js'; import { Message, RoleEmojiPair, Guild } from './database.js';
import { readdir } from 'fs/promises'; import { readdir } from 'fs/promises';
import { config } from 'dotenv'; import { config } from 'dotenv';
import { Op } from 'sequelize'; import { Op } from 'sequelize';