Skip to content

Ithil-protocol/discord-helper-bot

Repository files navigation

Discord Helper Bot

A helper bot to manage recurrent tasks on Ithil Discord server

Description

Fund an account Run $fund 0xabc... and get 0.1 gETH (Goerli test ETH), once per user

Get a resource link Run $resource docs (or blog, app) to get the latest link to the resource

Requirements

  • Poetry: Python package and version management. Install from here.
  • Python 3.8: install from here.

How to run it

In poetry.toml:

[tool.poetry.scripts]
discord_bot = "discord_bot.main:run_app"

enables us to run the code as:

poetry run discord_bot

Run the bot locally

You can run the bot locally. First make sure to add your API keys in the config.ini file.

When you are ready just run

make start

Manual Google Cloud Run image upload

You can manually push a new container image to Google Container Repository using local scripts.

  1. Install Docker

  2. Install Google Cloud CLI.

  3. Configure your local credentials with

gcloud auth login
gcloud auth configure-docker
  1. Build a container image locally with
make build-docker-image
  1. Push the image to Google Cloud Repository with
make push-image-to-container-registry

Manual Google Cloud Run deployment

You can manage deployments from here

Monitoring

You can get a simple status on the discord bot here.

Alternatively you can get an interactive update on your terminal with

watch -n 3 curl -s ...