Skip to content

Commit

Permalink
docs: update README about commands section
Browse files Browse the repository at this point in the history
  • Loading branch information
samhwang committed Apr 13, 2024
1 parent e92acd1 commit acab042
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ Run these commands at the root of the project
docker compose up -d db

pnpm install
pnpm prisma:gen
pnpm deploy:command
pnpm start
pnpm run prisma:gen
pnpm run deploy:command
pnpm run start
```

---
Expand All @@ -133,26 +133,34 @@ pnpm start
### DB migration & Client Generation

```bash
pnpm prisma:migrate
pnpm prisma:gen
pnpm run prisma:migrate
pnpm run prisma:gen
```

### DB GUI

```bash
pnpm prisma:studio
pnpm run prisma:studio
```

### Deploying your commands to a test Discord Server

- Please make sure you have filled out your `GUILD_ID`, `TOKEN` and `CLIENT_ID`
in the `.env` file.
- Add your commands into the `src/command/index.ts` file like so.
- Add your commands into the `src/slash-commands/index.ts` & `src/context-menu-commands/index.ts` file like so.

```ts
// File: src/slash-commands/index.ts
import yourCommand from './your-command';

export const commandList: SlashCommand[] = [yourCommand];
```

```ts
import yourCommand from './yourCommand';
// File: src/context-menu-commands/index.ts
import yourCommand from './your-command';

export const commandList: Command[] = [yourCommand];
export const commandList: ContextMenuCommand[] = [yourCommand]
```

- Run the `deploy:command` command.
Expand Down Expand Up @@ -182,8 +190,9 @@ pnpm deploy:command
### Running lints and tests

```bash
pnpm format
pnpm test
pnpm run lint
pnpm run format
pnpm run test
```

---
Expand Down

0 comments on commit acab042

Please sign in to comment.