Skip to content

Commit c202f89

Browse files
committed
Fix playtime command
1 parent ff52e26 commit c202f89

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"module": "src/index.ts",
44
"type": "module",
55
"scripts": {
6-
"start": "bun run src/index.ts",
7-
"watch": "bun run --watch src/index.ts",
8-
"build": "bun build src/index.ts --compile --outfile dist/bot",
6+
"start": "tsc && bun run src/index.ts",
7+
"watch": "tsc && bun run --watch src/index.ts",
8+
"build": "tsc && bun build src/index.ts --compile --outfile dist/bot",
99
"lint": "eslint .",
1010
"lint:fix": "eslint . --fix"
1111
},

src/commands/api/playtime.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
type ChatInputCommandInteraction,
77
type MessageActionRowComponentBuilder as MessageActionRow,
88
MessageFlags,
9-
PermissionFlagsBits,
109
SlashCommandBuilder,
1110
} from 'discord.js';
1211

@@ -208,10 +207,11 @@ async function handlePlaytimePlayerReply(
208207

209208
for (;;) {
210209
try {
211-
const pagination = await response.awaitMessageComponent({
212-
filter: (i) => i.user.id === interaction.user.id,
213-
time: 60_000,
214-
});
210+
const pagination =
211+
await response.resource!.message!.awaitMessageComponent({
212+
filter: (i) => i.user.id === interaction.user.id,
213+
time: 60_000,
214+
});
215215

216216
if (pagination.customId === 'playtimeNext') {
217217
if (page < maxPage) {

0 commit comments

Comments
 (0)