Skip to content

Commit

Permalink
Fix command registry lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleylamont committed Aug 18, 2024
1 parent 8c78d99 commit d0c1053
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file added bun.lockb
Binary file not shown.
4 changes: 3 additions & 1 deletion src/command-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export default async function registerCommands(): Promise<void> {
)
return;

const command = commands.get(interaction.commandName);
const command = commands.find(
(c) => c.data.name === interaction.commandName,
);

if (command === undefined || command === null) {
console.error(
Expand Down
2 changes: 1 addition & 1 deletion src/reacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const REACTIONS: [RegExp, string][] = [
[/sharepoint/i, "1036132153026691082"],
[/[ls]gtm/i, "962233144789049434"],
[/cs(?:sa)?ball/i, "1221369746927386624"],
[/typ[s$]t/i, "1222501775584788600"],
[/typ[$s]t/i, "1222501775584788600"],
[/latex/i, "1227561586701635626"],
];

Expand Down

0 comments on commit d0c1053

Please sign in to comment.