This tool is designed to automatically ban users from a specified VRChat group based on a list of user IDs. It can process user data from both JSON files (exported from VRCX) and plain text files containing comma-separated user IDs.
MIT License
The VRChat Group Auto-Ban Tool is designed to assist VRChat group moderators in efficiently managing large-scale banning operations. Its primary purpose is to automate the process of banning multiple users from a specified VRChat group, particularly useful when dealing with spam accounts, malicious users, or cleaning up after a major incident.
Key purposes of this tool include:
This project uses Rye for Python environment and dependency management. To set up the project:
rye sync
to install dependenciesThe project dependencies and settings are managed through the pyproject.toml
file.
pyproject.toml
: Project configuration and dependenciessettings.toml
: Default configuration settings with example values.secrets.toml
: Sensitive configuration settings (sensitive, gitignored)crashers.json
: JSON file containing user data from VRCX group export (gitignored)crasher_id_dump.txt
: Text file containing comma-separated user IDs to ban (gitignored)processed_users.json
: JSON file tracking processed user IDs (gitignored)vrchat_session.json
: JSON file storing session data for quicker authentication (sensitive, gitignored)LICENSE
: MIT License filesettings.toml
file in the src/vrchat_autoban/
directory, which serves as a template:username = "changeme"
password = "changemeaswell"
group_id = "grp_00000000-0000-0000-0000-000000000000"
rate_limit = 60
This file is version-controlled and provides an example of the required configuration.
.secrets.toml
file in the src/vrchat_autoban/
directory with your actual credentials:username = "your_vrchat_username"
password = "your_vrchat_password"
group_id = "grp_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Replace the values with your VRChat credentials and the ID of the group you want to manage.
Note: The .secrets.toml
file contains sensitive information. Never commit this file to version control or share it publicly. Ensure .secrets.toml
is added to your .gitignore
file to prevent accidentally committing sensitive information.
settings.toml
or .secrets.toml
using environment variables. The application uses Dynaconf with the prefix "VRCHATBAN". For example:export VRCHATBAN_RATE_LIMIT=30
export VRCHATBAN_USERNAME="my_vrchat_user"
export VRCHATBAN_PASSWORD="my_vrchat_password"
export VRCHATBAN_GROUP_ID="grp_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
This would override the rate limit, username, password, and group ID, respectively.
crashers.json
: A JSON file containing user data from VRCX group exportcrasher_id_dump.txt
: A plain text file with comma-separated user IDs to banPlace both files in the src/vrchat_autoban/
directory.
The application will load settings in the following order of precedence:
.secrets.toml
settings.toml
(lowest priority)This allows for flexible configuration management while keeping sensitive information secure.
Run the script:
rye run python src/vrchat_autoban/__init__.py
The script will:
Ensure your crashers.json
file is in the format exported by VRCX for group members. If you're unsure about this format, refer to VRCX documentation or export a sample file to see the structure.
Config
: Handles loading and storing of configuration data using dynaconfProcessedUserTracker
: Manages the list of processed user IDsTextUserLoader
and JSONUserLoader
: Load user IDs from text and JSON files respectivelySessionManager
: Manages VRChat authentication sessionsVRChatAuthenticator
: Handles the authentication processVRChatGroupModerator
: Performs the actual banning operationsVRChatAPI
: Main class that coordinates authentication and moderationThe script uses the loguru
library for logging. Logs are written to both the console and a file named vrchat_moderation.log
, which rotates daily.
The script includes error handling for various scenarios, including:
.secrets.toml
and vrchat_session.json
files secure. These contain sensitive data that could compromise your VRChat account if exposed.Contributions to improve the tool are welcome. Please follow these steps:
This tool is not officially affiliated with or endorsed by VRChat. Use at your own risk.