Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ The main hub for all games and fun features.

### Games

| Command | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------- |
| `/fun 8ball` | Ask the magic 8-ball |
| `/fun rps` | Rock paper scissors (solo or PvP) |
| `/fun tictactoe` | Tic Tac Toe (solo or PvP; opponent is DMed when it's their turn) |
| `/fun trivia` | Trivia with points and streaks |
| `/fun blackjack` | Interactive blackjack |
| `/fun connect4` | PvP Connect 4 (persistent multi-day; use **continue** to resume; opponent is DMed when it's their turn) |
| `/fun hangman play` | Hangman (dropdown letters, difficulty) |
| `/fun hangman stats` | Hangman stats (wins, fastest time) |
| `/fun hangman words add` | (Admin) Add word to list |
| `/fun hangman words list` | (Admin) List words |
| `/fun wordle` | Daily word puzzle |
| Command | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `/fun 8ball` | Ask the magic 8-ball |
| `/fun rps` | Rock paper scissors (solo or PvP) |
| `/fun tictactoe` | Tic Tac Toe (solo or PvP; opponent is DMed when it's their turn) |
| `/fun trivia` | Trivia with points and streaks |
| `/fun blackjack` | Interactive blackjack |
| `/fun connect4` | PvP Connect 4 (persistent multi-day; use **continue** to resume; opponent is DMed when it's their turn) |
| `/fun hangman play` | Hangman (dropdown letters, difficulty) |
| `/fun hangman stats` | Hangman stats (wins, fastest time) |
| `/fun hangman words add` | (Admin) Add word to list |
| `/fun hangman words list` | (Admin) List words |
| `/fun wordle` | Daily word puzzle |
| `/fun slots` | Slot machine (1, 3, or 5 rows) with jackpots; rare random events (Lucky Spin, Double XP, etc.) show in result |
| `/fun darts` | Throw 3 darts (solo or PvP), stats, leaderboards (best/180/PvP) |
| `/fun chess` | Challenge someone to chess or get Lichess links (vs computer) |
| `/fun memory` | Match pairs of cards (memory game) |
| `/fun higherlower` | Think of a number 1–100; bot guesses with Higher/Lower |
| `/fun would-you-rather` | WYR questions |
| `/fun coinflip` | Heads or tails |
| `/fun choose` | Pick one or more options at random (e.g. pizza, pasta, salad) |
| `/fun dice` | Roll dice (notation: 2d6+3, or sides/count) |
| `/fun utility poll` | Create polls |
| `/fun darts` | Throw 3 darts (solo or PvP), stats, leaderboards (best/180/PvP) |
| `/fun chess` | Challenge someone to chess or get Lichess links (vs computer) |
| `/fun memory` | Match pairs of cards (memory game) |
| `/fun higherlower` | Think of a number 1–100; bot guesses with Higher/Lower |
| `/fun would-you-rather` | WYR questions |
| `/fun coinflip` | Heads or tails |
| `/fun choose` | Pick one or more options at random (e.g. pizza, pasta, salad) |
| `/fun dice` | Roll dice (notation: 2d6+3, or sides/count) |
| `/fun utility poll` | Create polls |

**Rate limits** (per user, to prevent spam):

Expand Down
8 changes: 4 additions & 4 deletions docs/recommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Suggestions for new slash commands and other improvements. Prioritized by impact

### Medium value

| Command | Description | Why |
| ----------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **`/fun choose`** | Pick one (or N) from a list: “A, B, C” or “option1 / option2”. | Quick “bot pick for us” without a full poll; good for games or decisions. |
| Command | Description | Why |
| ----------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **`/fun choose`** | Pick one (or N) from a list: “A, B, C” or “option1 / option2”. | Quick “bot pick for us” without a full poll; good for games or decisions. |
| **`/fun utility remind_list`** (already exists) | — | Consider surfacing in `/help` or a “Your reminders” line in `/profile view` so it’s discoverable. |
| **`/config moderator-role`** | Add/remove a role that can use `/admin` moderation. | You have DB-backed moderator roles; if not exposed yet, a subcommand here would complete the story. |
| **`/config moderator-role`** | Add/remove a role that can use `/admin` moderation. | You have DB-backed moderator roles; if not exposed yet, a subcommand here would complete the story. |

### Lower priority / niche

Expand Down
10 changes: 8 additions & 2 deletions src/commands/games/fun/subcommands/games-b/tictactoe/vsBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,20 @@ export async function playVsBot(interaction: ChatInputCommandInteraction): Promi
if (isKnownInteractionError(err)) {
logKnownInteractionError(err, "tictactoe.vsBot.collect", { gameId });
} else {
getContextLogger().warn({ err, gameId }, "[tictactoe] vsBot button collect threw");
getContextLogger().warn(
{ err, gameId },
"[tictactoe] vsBot button collect threw",
);
}
}
});

collector.on("end", async (_, reason) => {
if (reason === "time") {
getContextLogger().warn({ gameId, userId: interaction.user.id }, "[tictactoe] vsBot timed out");
getContextLogger().warn(
{ gameId, userId: interaction.user.id },
"[tictactoe] vsBot timed out",
);
await safeMessageEdit(
message,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ export async function playVsPlayer(
if (isKnownInteractionError(err)) {
logKnownInteractionError(err, "tictactoe.vsPlayer.collect", { gameId });
} else {
getContextLogger().warn({ err, gameId }, "[tictactoe] vsPlayer button collect threw");
getContextLogger().warn(
{ err, gameId },
"[tictactoe] vsPlayer button collect threw",
);
}
}
});
Expand Down
5 changes: 4 additions & 1 deletion src/commands/games/giveaway/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ export async function autoEndGiveaway(
});
}
} catch (err) {
getContextLogger().warn({ err, giveawayId }, "[giveaway] update message on auto-end threw");
getContextLogger().warn(
{ err, giveawayId },
"[giveaway] update message on auto-end threw",
);
}

if (winners.length > 0) {
Expand Down
10 changes: 8 additions & 2 deletions src/commands/other/playback/playback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ export async function execute(interaction: ChatInputCommandInteraction): Promise
await safeEditReply(interaction, { components: [] }, "playback.end");
} catch (err) {
// ignore
getContextLogger().debug({ err }, "[playback] cleanup after collector end failed");
getContextLogger().debug(
{ err },
"[playback] cleanup after collector end failed",
);
}
});
} catch (err) {
Expand All @@ -188,7 +191,10 @@ export async function execute(interaction: ChatInputCommandInteraction): Promise
});
}
} catch (replyErr) {
getContextLogger().error({ err: replyErr }, "[playback] send fallback error reply threw");
getContextLogger().error(
{ err: replyErr },
"[playback] send fallback error reply threw",
);
}
}
}
5 changes: 4 additions & 1 deletion src/commands/social/quote-message/quote-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ export async function execute(
embeds: [embed],
});
} catch (err) {
getContextLogger().error({ err, command: "quote-message" }, "[quote-message] save quote threw");
getContextLogger().error(
{ err, command: "quote-message" },
"[quote-message] save quote threw",
);
await interaction.editReply("The quote couldn't be saved. Try again in a moment.");
}
}
5 changes: 4 additions & 1 deletion src/commands/social/summary/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export async function execute(interaction: ChatInputCommandInteraction): Promise
);
}
} catch (err) {
getContextLogger().error({ err, command: "summary" }, "[summary] summary command threw");
getContextLogger().error(
{ err, command: "summary" },
"[summary] summary command threw",
);

if (interaction.deferred || interaction.replied) {
await interaction.editReply(
Expand Down
8 changes: 7 additions & 1 deletion src/services/games/randomEvents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ describe("randomEvents", () => {
for (let i = 0; i < 50; i++) {
const result = rollRandomEvent({
triggerChance: 1,
weights: { lucky_spin: 1, double_xp: 1, bonus_coins: 1, jackpot_boost: 1, none: 0 },
weights: {
lucky_spin: 1,
double_xp: 1,
bonus_coins: 1,
jackpot_boost: 1,
none: 0,
},
});
kinds.push(result.kind);
if (result.kind !== "none") {
Expand Down
Loading