Giter VIP home page Giter VIP logo

harmony_one_tip_bot's Introduction

One Tip Bot

This bot will be used to Tip Members using Telegram Channel and Twitter

Following dendencies needs to be installed for running this bot.

Needs to install MongoDB, please following below link to install MongoDB

https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-20-04

Python

pip3 install pyhmy

pip3 install pymongo

pip3 install python-telegram-bot

pip3 install telethon

pip3 install qrcode

pip3 install Image

Need to install hmy binary

Create hmydir directory under main directory and download the hmy binary

https://docs.harmony.one/home/wallets/harmony-cli/download-setup

Node JS needs be installed on the machine, please follow below link to instal Node

https://nodejs.org/en/download/package-manager/

Node

sudo npm install twitter-autohook --save

Please check following link for more detail on Twitter Autohook

https://github.com/twitterdev/autohook

Get Auth token from NGROK

https://dashboard.ngrok.com/signup

sudo npm install mongoose

Api Keys

  • Go to the following and create a new app: https://developer.twitter.com/en/portal/apps/
  • Go to the settings of app created above and change app permissions to "Read, Write, and Direct Messages".
  • In the navigation panel go to Products -> Premium -> Dev Environment and setup "Account Activity APISandbox".
  • Put all the api keys in the secret.js and secret.py file.
  • TWITTER_WEBHOOK_ENV refers to the Dev environment label in twitter API dashboard
  • In Twitter > More > Settings > Privacy and Safety > Direct Messages , tick "Allow message requests from everyone"
  • Change bot_name, twitter_bot_name, twitter_bot_handle in telegramtipbot.py
  • Change twitter_uid, bot_twitter_handle in twittertipbot.py
  • Change _networkUrl in hmyclient.py to point to production
  • Change explorer_url in telegramtipbot.py and twittertipbot.py to point to production
  • Change botTwitterId,botHandle variables in twitter_autohook.js

Running the Bot

tmux new-session -s python

python3 onetipbot.py

Ctrl-B and D

tmux new-session -s node

node twitter_autohook.js

Ctrl-B and D

You can attached to a session to close or run by

tmux attach-session -t session-name

harmony_one_tip_bot's People

Contributors

harmony-community-node avatar mirrormirage0 avatar pops-one avatar rac-sri avatar yelllowsin avatar

Watchers

 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.