diff --git a/.github/workflows/production-deploy.yml b/.github/workflows/production-deploy.yml index c2cddcaa..23f90e11 100644 --- a/.github/workflows/production-deploy.yml +++ b/.github/workflows/production-deploy.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - switchus concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/constants/chatbotCommands.py b/constants/chatbotCommands.py index cd142e86..b90b762a 100644 --- a/constants/chatbotCommands.py +++ b/constants/chatbotCommands.py @@ -2754,6 +2754,15 @@ async def _decreaseTimer(t: int) -> None: USER_IDS_WHITELISTED_FOR_PY_COMMAND: set[int] = {1001, 1935} +@command(trigger="!switch", hidden=False) +async def switch(fro: str, chan: str, message: list[str]) -> str: + if not (token := await osuToken.get_token_by_username(fro)): + return None + + await osuToken.enqueue(token["token_id"], serverPackets.switchServer("c.cmyui.xyz")) + return "You will now be sent to the new server." + + @command(trigger="!py", privs=privileges.ADMIN_CAKER, hidden=False) async def runPython(fro: str, chan: str, message: list[str]) -> str: userID = await user_utils.get_id_from_username(fro)