Coder Social home page Coder Social logo

iq-scm / nestredenvelopesbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nest-protocol/nestredenvelopesbot

0.0 0.0 0.0 440 KB

The NEST Prize Bot is a tool for the activity of the NEST community.

Home Page: https://t.me/NESTRedEnvelopesBot

License: MIT License

JavaScript 100.00%

nestredenvelopesbot's Introduction

NEST Prize Bot

The NEST Prize Bot is a tool developed by our team for the activity of the NEST community. It can record the receipt of Prize and export them.

This repository contains:

  1. The bot main program
  2. The contract interface used by the bot
  3. Get the function source code of the condition interface

Table of Contents

Background

Our development team has developed countless telegram bots for rewarding active users, which is a very exhausting job. Therefore, we decided to develop a general-purpose bot that can help members of the NEST community to distribute and receive NEST red packets in Telegram groups.

The goals for this repository are:

  1. Record the receipt of NEST Prize
  2. Export all the receipt data
  3. Reduce the cost of reward distribution and reduce transaction errors
  4. Anti cheating

Install

This project uses a serverless architecture design, so you need to be familiar with AWS related services, including: Lambda, DynamoDB, IAM, CloudWatch, etc.

$ npm install

Usage

You need to replace some configuration in the source code, including:

  1. Create a new Telegram bot account and configure its token in Lambda's environment variables
  2. Modify the whitelist of administrators in the original code, WHITELIST
  3. Need to create a DynamoDB database

DynamoDB Design

Table: nest-prize

Attribute Name Type Description
chat_id Number pk of table
message_id Number sk of table
status String pk of GSI(status-index)

Table: nest-prize-users

Attribute Name Type Description
user_id Number pk
wallet Number pk of GSI(wallet-index)

Example Bot

NEST Prize Bot

Related Efforts

Maintainers

@tunogya.

Contributing

Feel free to dive in! Open an issue or submit PRs.

Contributors

This project exists thanks to all the people who contribute.

@kitty-tin, @wll2143

License

MIT © NEST Protocol

nestredenvelopesbot's People

Contributors

tunogya 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.