This repository has been archived on 2024-07-30. You can view files and clone it, but cannot push or open issues or pull requests.
VencordEAS/README.md

32 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2024-06-17 19:22:56 -04:00
# Vencord EAS
This is the repo for both the frontend and backend for the Vencord Emergency Alert System.
2024-06-18 01:22:51 -04:00
Demo instance at https://vencord-eas.nin0.dev, websocket url is wss://eas-ws.nin0.dev, token is 3coA4foQw89t0q3h57r7.
2024-06-18 01:22:29 -04:00
2024-06-17 19:22:56 -04:00
## Installation
You run the server by:
1. Installing the `websockets` and `python-dotenv` packages;
1. Making a `.env` file;
1. Adding a line with `TOKEN={token}`, with `{token}` being any string that'll be used to broadcast messages;
1. Running `python main.py`.
## Usage
You can send raw text to the WS server. This text is in form of commands:
2024-06-17 19:24:50 -04:00
- `GET` will reply with a message response;
2024-06-17 19:22:56 -04:00
- `MSG {token} {message}` will set the message and broadcast it to all logged-in clients;
- `CLEAR {token}` will clear the current message.
2024-06-18 01:10:19 -04:00
You may receive one of three responses while using the server:
2024-06-17 19:22:56 -04:00
- `MSG {message}` to indicate there's a new message. The client should react by showing an alert with the message. If no message is present, the packet will be `MSG` only. In this case, the client shouldn't react.
- `OK` indicates the action was successful. The client should react by showing an alert telling the user so.
2024-06-18 01:10:19 -04:00
- `NULL` to indicate that no data is available. No client reaction is intended.
2024-06-17 19:22:56 -04:00
## Frontend
2024-06-18 01:10:19 -04:00
The frontend is a static HTML page and can be hosted on anything.