Fix config.ts and add more comments

This commit is contained in:
Yi-Ting Shih
2024-08-16 07:18:44 +08:00
parent 48b04a50df
commit b916b7cbad
2 changed files with 14 additions and 12 deletions

View File

@@ -3,9 +3,11 @@
## Run ## Run
1. Setup the environment variables in `.env` 1. Setup the environment variables in `.env`
2. `docker compose up -d` 2. Modify `config.ts` if you want.
3. `docker compose up -d`
## Usage ## Functionality
- Apply default role to new members while joining.
- `/ping` repond with latency. - `/ping` repond with latency.
- `/applyrole` apply role to everyone in the guild. (max 1000 people) - `/applyrole` apply role to everyone in the guild.

View File

@@ -3,20 +3,20 @@ import dotenv from 'dotenv';
dotenv.config(); dotenv.config();
export const config = { export const config = {
// Token and client id can be found in Discord Developer Protol.
token: process.env.DC_TOKEN!, token: process.env.DC_TOKEN!,
clientId: process.env.DC_CLIENTID!, clientId: process.env.DC_CLIENTID!,
// The user that the bot will DM when starts.
adminId: process.env.ADMIN_ID ?? '', adminId: process.env.ADMIN_ID ?? '',
nickname: '橘ありす', nickname: '橘ありす',
playing: 'アイドルマスター シンデレラガールズ U149', playing: 'アイドルマスター シンデレラガールズ U149',
defaultRole: process.env.DEFAULT_ROLE ?? '',
urls: {
author: 'https://konchin.com',
icon: 'https://secure.gravatar.com/avatar/c35f2cb664f366e3e3365b9c22216834?d=identicon&s=512',
help: '',
git: 'https://git.konchin.com/discord-bot/Tanikaze-Amane',
issue: 'https://git.konchin.com/discord-bot/Tanikaze-Amane/issues'
},
logger: { logger: {
logFile: 'test.log', logFile: 'test.log',
}, },
// The default role id to apply when new member join.
// Can be obtained in Discord from right clicking the role.
defaultRole: process.env.DEFAULT_ROLE ?? '',
}; };