Categorygithub.com/BranDebs/challenge-bot
modulepackage
0.0.1
Repository: https://github.com/brandebs/challenge-bot.git
Documentation: pkg.go.dev

# README

challenge-bot

Telegram bot to handle challenges

Quick Start

To run the bot in dev env locally:

# Runs locally challengebot along with the resources.
make dev

Note that there is hot reload when using this mode.

To run the env only:

# Creates the resources needed like DB, DBA.
make env

To build the docker image:

# Build docker image with the tag challenge_bot:latest
make build

To clean:

make clean

Using DBA

# Go to localhost:1337

System: PostgreSQL
Server: challenge_db
Username: postgres
Password: postgres123
Database: challenge

Schema

type Challenge struct {
    ID uint64
    Name string
    UserIDs []uint64
    StartDate uint64
    EndDate uint64
    Schema []byte // example: "{value: int}", "{age: int, money: int64}"
}

type User struct {
    ID uint64 // retrieve from Telegram
    Username string // retrieve from Telegram

}

type Goal struct {
    ID uint64
    UserID uint64
    ChallengeID uint64
    Value []byte // {value: 2}, "{age: 30, money: 50}"
}


type Progress struct {    //cannot be updated
    ID uint64
    UserID uint64
    ChallengeID uint64
    Value []byte // {value: 2}, "{age: 30, money: 50}"
    Date uint64
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author