diff --git a/Dockerfile b/Dockerfile index bbfb974..82c038e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,6 @@ FROM golang:alpine RUN apk add git ENV MODE=production -ENV GOPRIVATE=github.com/tribalwarshelp - -COPY ./.netrc /root/.netrc -RUN chmod 600 /root/.netrc WORKDIR /go/src/app COPY . . diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5048358 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Dawid WysokiƄski + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ea2b1a3 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# TWHelp DC Bot + +Features: + +1. Coords translation +2. Near real-time notifications about conquers +3. Tribe members ordered by OD/ODA/ODD/ODS/points + +## Development + +**Required env variables to run this bot** (you can set them directly in your system or create .env.development file): + +``` +DB_USER=your_pgDb_user +DB_NAME=your_pgdb_name +DB_PORT=your_pgdb_port +DB_HOST=your_pgdb_host +DB_PASSWORD=your_pgdb_password +API_URL=your_api_url +BOT_TOKEN=your_bot_token +``` + +### Prerequisites + +1. Golang +2. PostgreSQL database +3. Configured [API](https://github.com/tribalwarshelp/api) + +### Installing + +1. Clone this repo. +2. Navigate to the directory where you have cloned this repo. +3. Set required env variables directly in your system or create .env.development file. +4. go run main.go diff --git a/cron/handler.go b/cron/handler.go index ca11457..7ef692b 100644 --- a/cron/handler.go +++ b/cron/handler.go @@ -129,7 +129,6 @@ func (h *handler) checkEnnoblements() { ennoblementsByServerKey, err := h.loadEnnoblements(servers) if err != nil { log.Print(err) - return } for _, group := range groups { diff --git a/readme.md b/readme.md deleted file mode 100644 index 495888f..0000000 --- a/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# DC Bot - -Required ENV Variables: - -- DB_USER= -- DB_NAME= -- DB_PORT= -- DB_HOST= -- DB_PASSWORD= -- API_URL= -- BOT_TOKEN=