Giter Site home page Giter Site logo

skyaway's Introduction

skyaway - A telegram bot for skycoin giveaway events

This is a telegram bot which sits in a group and tracks its members. Admins can start, end, schedule, and cancel events, and also manage the users. The admin configures the event duration and specifies the total number of coins to be given away during each event.

When an event starts, the bot copies the list of current users in the chat. Everyone on that list will be able to claim some skycoins during the event. Each user is able to claim total_coins / number_of_users. If this number is not round, then the user will receive the rounded in a random direction number of coins. E.g. if there is 10 coins and 3 users, each of them will receive 3 or 4 coins. The event ends earlier if no coins remain or when all users on the list have made claims.

The bot will then listen for @replies or direct messages from users. If the user is on the list of users that may receive coins, the bot asks their skycoin address and then sends the coins there. If the user is not on the list, the bot tells them to wait for the next event.

The bot is able to countdown to events.

Install

go get github.com/kvap/skyaway

Docs

Detailed docs are available at http://godoc.org/github.com/kvap/skyaway.

Example

  1. Build the example with go build github.com/kvap/skyaway/skyawaybot.
  2. Set up the database (a schema for postgres is provided in schema.postgres.sql).
  3. Create config.json in the current director (you can base upon config.example.json).
  4. Run ./skyawaybot.

skyaway's People

Contributors

gz-c avatar kvap avatar therealssj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.