Events/lynch

From Werewolf Wiki
Jump to navigation Jump to search

The lynch event is called whenever someone votes to lynch someone else.

Event callback

def on_lynch(event: Event, cli: IRCClient, var: module, nick: str) -> None
  • The default action is to allow the vote to be placed, if the default action is prevented the vote is not placed. It is the event handler's responsibility to somehow inform the player why the command did not work.
  • event: The event object
  • cli: The IRC connection
  • var: Reference to the src.settings module
  • nick: Person executing the !vote command

Event data

{
    "target": str
}

The target is what nick the player voted to lynch.