Skip to main content

Python Splatoon-orientated Discord Bot that can interact with SplatTag

Project description

Dola

Dola is a Python-based bot specialising in Splatoon and Slapp but also comes with some utility functions. Code on Github.

Import prefix is DolaBot.

Requirements

  • Python 3.9+

Bot Setup

  • Create a .env in the repository root with the following values:
# This is the bot's Discord token from the Developer API page.
BOT_TOKEN="xxxx.xxxx.xxxx"
# This is the bot's Discord Id.
CLIENT_ID=123456789
# This is your Discord Id.
OWNER_ID=123456789
# Path to SplatTagConsole for Slapp things
SLAPP_CONSOLE_PATH=".../SplatTagConsole.dll"
# Path to the Slapp App Data folder
SLAPP_DATA_FOLDER=".../SplatTag"
# Discord id of a logging channel (optional)
LOGS_CHANNEL=870436255777837098
# Bot command symbol (optional). 
# '~' by default or not specified.
# Recommend using a different symbol for local testing.
BOT_COMMAND_SYMBOL="+"

You must also set the relevant env values for SlappPy

Dockerised setup (not required)

  • The Dockerfile assumes SplatTag is under /bin. Adjust if necessary.
    • First, grab SplatTag and put it into the Docker build context, e.g.
    • . GrabSplatTag.bat

THEN

  • With Docker Desktop running,
  • docker build --no-cache --pull --tag="slate.azurecr.io/dola:latest" -f Dockerfile .

Test or run with

  • docker run -t -d slate.azurecr.io/dola

Update Azure Image with

After the build step, (note these commands are long in this window!)

  • az login
  • az acr login --name slate
  • docker push slate.azurecr.io/dola:latest
  • To stop:
    • az container stop --name dola --resource-group slapp-resource-group
  • To recreate from scratch (this should also re-pull the image)
    • az container create --resource-group slapp-resource-group --name dola --image slate.azurecr.io/dola:latest
    • The username is slate, and the password is in the ACR access keys.
  • To start:
    • az container start --name dola --resource-group slapp-resource-group

Azure Cloud setup from scratch

ACR_NAME=slate.azurecr.io
SERVICE_PRINCIPAL_NAME=acr-service-principal
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
SP_APP_ID=$(az ad sp show --id http://$SERVICE_PRINCIPAL_NAME --query appId --output tsv)
echo "Service principal ID: $SP_APP_ID"
SP_PASSWD=$(az ad sp create-for-rbac --name http://$SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role acrpull --query password --output tsv)
echo "Service principal password: $SP_PASSWD"
az container create --resource-group slapp-resource-group --name dola --image slate.azurecr.io/dola

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DolaBot-Slate-1.0.1.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

DolaBot_Slate-1.0.1-py3-none-any.whl (56.0 kB view details)

Uploaded Python 3

File details

Details for the file DolaBot-Slate-1.0.1.tar.gz.

File metadata

  • Download URL: DolaBot-Slate-1.0.1.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for DolaBot-Slate-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8921d8ddc333aec14f5eb16258200bd50770b800a59abd681e11486bf5033d6c
MD5 3e6bee8f506de05fdfd97cf4b5933e13
BLAKE2b-256 cf759d4e3bf2756ae4cab0283942e36cb275fbc763d7472e3ee15e84b344505d

See more details on using hashes here.

File details

Details for the file DolaBot_Slate-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: DolaBot_Slate-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 56.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.7

File hashes

Hashes for DolaBot_Slate-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f8edc339ba7d438689e4314d52d6af3f098edc89635a71fa2dafa6430323420
MD5 94a77a692634ea76b49d311a6927b530
BLAKE2b-256 05a4ad2738f7473184f23aed364672a5b9da58c04839e4082a631a618066d69d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page