Skip to content

Commit

Permalink
fix bot not starting
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeAspy committed Aug 24, 2024
1 parent ec60e3d commit a0674e2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- `BUCKET_SECRET_KEY`: The bucket's secret key
- `BUCKET_NAME`: The bucket's name
- `BUCKET_DOMAIN`: The bucket's public facing URL. (default: `https://s3.example.com`)
- `BLACKLISTED_WORDS`: List of strings the badge name cannot contain
5. Install packages using a node package manager (I suggest [PNPM](https://pnpm.io/)): `pnpm i`
6. Build: `pnpm build`
7. Run: `pnpm start`
3 changes: 2 additions & 1 deletion src/commands/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import {
import { fireVerification } from "../lib/verification.js";
import { Badge } from "../types/badge.js";

import { blacklistedKeys } from "../main.js";
const blacklistedKeys =
process.env["BLACKLISTED_WORDS"]!.toLocaleLowerCase().split(",");

export const data = new SlashCommandBuilder()
.setName("badge")
Expand Down
4 changes: 1 addition & 3 deletions src/lib/pushCommands.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { commandData } from "./indexer.js";
import { REST, Routes } from "discord.js";

const restAPI = new REST({ version: "10" }).setToken(
process.env["DISCORD_TOKEN"]!,
);
const restAPI = new REST().setToken(process.env["DISCORD_TOKEN"]!);

export async function pushCommands(): Promise<void> {
try {
Expand Down
3 changes: 0 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ import { handleCommand } from "./handler/command.js";
import { handleButton } from "./handler/button.js";
import { handleAutocomplete } from "./handler/autocomplete.js";

export const blacklistedKeys =
process.env["BLACKLISTED_WORDS"]!.toLocaleLowerCase().split(",");

client.on(Events.InteractionCreate, (interaction) => {
if (interaction.isCommand()) {
void handleCommand(
Expand Down

0 comments on commit a0674e2

Please sign in to comment.