- Python>=3.10
- linux (for the botHandler)
- Pre-setup database instructions can be found here
- Read and understand the Terms Of Service
- Read and understand the Privacy Policy
- Download the file
named
setup.pyHERE - Your folder structure should look like this:
folderNameHere
│ botHandler.pyw
│ privVars.py
│ setup.py
│
└───Discord-Bot
-
Open the file named
privVars.pyand edit the variables that have...as their value to the correct values -
Edit the variables such that they contain the correct information.
- Any Variables that are commented out are not required but are recommended for full functionality
- Run the file
botHandler.pywviapython3 botHandler.pyw
- Clone the repo or download the zip file
- Run the script 'setup.py' with the following command:
python3 setup.pyThe command for python might be under a different name, here are the most common names if python3 doesn't work:
pythonpypy3
- Open the file
setup.pyand edit the variables that have...as their value to the correct values
- Run the file
botHandler.py
- Run the file
main.pyw
DEBUG = False- Whether to use debugging in the log, this will add a lot more to the log file and can be used if you have issues.
cstats: str- Adds a custom field to the stat message
db_name = "MCSS"- The name of the cluster
col_name = "scannedServers- The name of the collection
- Twitch settings, these are not required but add more functionality to the bot
client_id: strclient_secret: str
IPInfo API
IP_INFO_TOKEN: str- The token from
ipinfo.iofor location gathering
- The token from
max_threads = 10- Determines the maximum number of threads the scanner can use
max_pps = 1000- Determines the maximum number of pings the scanner can send
azure_client_id: strazure_redirect_uri: str- Both of these are copied from an azure application and are needed to use the
Joinfunctionality
- Both of these are copied from an azure application and are needed to use the
SENTRY_TOKEN: strSENTRY_URI: str- Used for implementing error tracking with Sentry
dev: bool- Whether to use the dev branch instead of the master branch
target: str = "scanner" | "bot" | "rescanner"- What the handler should launch
autoupdate: bool- Should the handler keep itself up to date?
# Base Settings (Required)
DISCORD_TOKEN = (
"Very Secret Token"
)
MONGO_URL = "mongodb://pilot1782:Hunter2@127.0.0.1:27017"
# Database settings
# db_name = "MCSS"
# col_name = "scannedServers"
# DISCORD_WEBHOOK = "..."
# Twitch API settings
# client_id = "..."
# client_secret = "..."
# IPInfo API settings
# IP_INFO_TOKEN = "..."
# Debug settings
# DEBUG = False
# scanner settings
# max_threads = 10
# max_pps = 3000
# fun settings
# cstats = "..."
# Azure AD settings
# azure_client_id = "..."
# azure_redirect_uri = "..."
# error logging
# SENTRY_TOKEN = "..."
# SENTRY_URI = "..."
# handler settings
# dev = True
# target = "scanner"
# autoupdate = True