Skip to Content
Haven Documentation is the shared home for product guides, plugin setup, and release docs.
PluginsRandom GamesCommands and Gameplay

Commands and Gameplay

Random Games has two command surfaces:

  • Message command: !game
  • Slash command: /game leaderboard

The message command is for starting games. The slash command is for viewing leaderboards.

Message Commands

CommandWhat it does
!gameShows the available games list.
!game helpShows the available games list.
!game listShows the available games list.
!game randomStarts a randomly selected game.
!game <alias>Starts a specific game by alias.
!game <alias> <seconds>Starts a specific game with a one-time custom duration.

Examples:

!game trivia !game logo !game pokemon 20 !game random

The plugin deletes the original !game message when possible to keep the game channel clean.

Slash Commands

CommandWhat it does
/game leaderboard type: dailyShows the daily leaderboard.
/game leaderboard type: weeklyShows the weekly leaderboard.
/game leaderboard type: monthlyShows the monthly leaderboard.

Leaderboard results are generated as an image card. If there are more than ten players, the command response includes buttons to page through results.

Supported Games

GameAliasMain interaction
Rock Paper ScissorsrpsButton choice
TriviatriviaText answer
RiddlesriddlesText answer
UnscrambleunscrambleText answer
TyperacertypeFast text typing
Guess The SongsongText answer
Who’s That PokemonpokemonButton choice
Guess The PokemonguesspokemonButton choice
Guess The CelebritycelebVisual or text answer
Guess The MoviemovieVisual or text answer
Quick MathmathText answer
Odd One OutoddoneButton choice
Guess The CountrycountryText or visual answer
Capital GuessercapitalText answer
Gap FillgapText answer
Emoji GuesseremojiText answer
Guess The NumbernumberText answer
Roman Numeral ConversionromanText answer
Guess The LandmarklandmarkButton choice
Guess The Comic CharactercomicButton choice
Memory MatchmemoryButton choice
Heads Or TailshotButton choice
Guess The LogologoButton choice
CornerscornersButton choice

Automatic Game Flow

When randomGames.channelId is set, the plugin watches that channel. It tracks message count, checks the configured interval, respects cooldowns, and starts a random game when the trigger rules allow it.

The normal flow is:

  1. A message is posted in the configured game channel.
  2. The plugin increments the channel activity counter.
  3. The handler checks whether a game is already active.
  4. The handler checks cooldown and trigger rules.
  5. A random game is selected from src/games.
  6. A countdown is posted.
  7. The game module runs the round.
  8. The winner is recorded.
  9. Rewards and leaderboard updates are applied.

Manual Game Flow

When a member runs !game trivia, the plugin:

  1. Deletes the command message if the bot has permission.
  2. Checks commands.gameCommandRole if it is configured.
  3. Converts the alias into the game class name.
  4. Checks whether a game is already running in that channel.
  5. Applies a custom duration if one was provided.
  6. Runs the countdown and game module.

Reward Flow

Reward output depends on rewards.type.

ValueBehavior
bothGives XP and coins.
coinsGives only economy coins.
xpGives only XP.

Reward amount is selected from the configured size ranges. First, second, and third place can have different probability weights from the default winner reward.

Leaderboard Flow

Random Games tracks separate daily, weekly, and monthly win counts. At each scheduled reset, it can:

  • Announce top players
  • Assign MVP roles
  • Clear the period leaderboard
  • Keep the next period ready for new wins

Use /game leaderboard to view current data at any time.