Anonymous Wolf Game Bot
Go to file
Joey Hines 2e5c102887
Block users from using external emoji (Fixes #2)
+ Scan incoming messages for emoji, if they are from an external server they are blocked
+ clippy + fmt
2022-05-15 11:54:42 -06:00
src Block users from using external emoji (Fixes #2) 2022-05-15 11:54:42 -06:00
.gitignore Added commands + persistence 2022-03-06 10:03:49 -07:00
Cargo.lock Added profile pic support + fixed an issue with webhook serailization 2022-03-20 17:42:50 -06:00
Cargo.toml Added profile pic support + fixed an issue with webhook serailization 2022-03-20 17:42:50 -06:00
LICENSE Initial commit 2022-03-05 14:35:02 -07:00
README.md Moved event_handler to its own module and cleaned up readme 2022-03-20 09:46:40 -06:00

README.md

wOXlf

Discord bot for managing an anonymous Werewolf Game.

How It Works

A host gets a list of players to play, and then begins the game with the $start command.

Each player is assigned a channel where they will view the game through. The player can read and send messages in this channel normally. When a message is sent, it is forwarded to all other player channels. The message's author is obscured by a codename. During day phases, players can cast a vote for who they wish to "terminate" that day.

The game proceeds as a normal Werewolf game.

Channels

  • Host Channel: Used by the host to interact with the game, can also be used by spectators to see the game state.
    • Real player names are displayed along with code names in this channel
  • Player Channel: A channel for a single player, allows them to chat with the other players and run commands.
  • Vote Channel: Contains all the votes made in a game.

Commands

Host

  • $start <hours>h<minutes>m <list of player ids> - starts the game
  • $end - Ends the current game
  • $say <msg> - Allows the host to speak into the game chat
  • $broadcast <msg> - Broadcasts a system message, this message is then pinned in each player channel
  • $next_phase <hours>h<minutes>m <msg> - Send the next phase message. Also cycles the phase
  • $terminate <player> - Kills a player and removes them from the game
  • $add_time <hours>h<minutes>m - Adds more time to the current game

Players

  • $vote <player> - Casts a vote for a player to be terminated. Only can be used during the day phase
  • $status - Get the current game status. Includes time left in the phase and current vote tallies
  • $players - Lists all the players in the game

Example Config

# Discord Bot Token
token = ""
# Discord App Id
app_id = 0
# Channel to accept host commands from
host_channel = 1
# Channel to put vote status messages in
vote_channel = 2
# Category to crate the player cannels in
category = 3
# Directory to save game data into, game data will be saved as "wOxlf.toml"
game_state_dir = "."

# Random code names are generated in the format of <Adjective> <Occupation>

occupation = ["Engineer", "Scientist", "Dancer", "Farmer", "Captain", "Janitor", "Author", "Bartender", "Bum",
    "Student", "Teacher", "Chef", "Waiter", "Comedian"]

adjective = ["Sleepy", "Drunk", "Smart", "Gifted", "Extreme", "Eccentric", "Amazing", "Bad", "Silly", "Dumb", "Smelly"]

License

MIT License