Skip to content

Instantly share code, notes, and snippets.

@ajeetraina
Created October 1, 2021 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajeetraina/31b6bac797c28db7d0dfb153a5d9c077 to your computer and use it in GitHub Desktop.
Save ajeetraina/31b6bac797c28db7d0dfb153a5d9c077 to your computer and use it in GitHub Desktop.
Join Game Function
class JoinGameFunctionBuilder(BaseFunctionBuilder):
def __init__(self):
super().__init__(command_name='join_game')
def register_command(self):
"""
Determines best public server to join to.
- Assings User to the Game.
- Increments playercount
Arguments:
user, game, secret (optional)
Returns:
redis key [GAME:game_id]
Trigger example:
RG.TRIGGER join_game user1 game1
RG.TRIGGER join_game user1 game1 secret123
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment