Created
October 1, 2021 08:40
-
-
Save ajeetraina/31b6bac797c28db7d0dfb153a5d9c077 to your computer and use it in GitHub Desktop.
Join Game Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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