pip install -U mafiagg
pip install -U python-dotenv
python-dotenv
lets you pass a .env
file with your mafia.gg credentials
MAFIA_USERNAME=username
MAFIA_PASSWORD=password
from mafiagg.client import Bot
from mafiagg.credential_manager import CredentialManager
from sys import exit
auth = CredentialManager()
bot = Bot(auth=auth, command_prefix="$")
try:
bot.run()
except KeyboardInterrupt:
exit(0)
When you run the bot for the first time, it will download some metadata it a
./data/
folder.
super().__init__
callsuser-session
(cookie invalidation)Clone the repo
git clone https://github.com/blacksmithop/MafiaggBot
cd MafiaggBot
Install the dependencies
python3 -m pip install -r requirements.txt