GithubHelp home page GithubHelp logo

tipbot's Introduction

Bot for Discord communities to facilitate crypto coin tipping!

(This README will be updated along with bot updates)

Features:

  • Tipbot for any coin running the bitcoind client.
    • Help message !tip.
  • Dynamic plugin loading with permission support.
  • out of the box Supported Coins
    • Dogecoin (DOGE)
    • Ravencoin (RVN)
    • LBRY Credits (LBC)
    • Uniform Fiscal Object (UFO)
    • Proton (PROTON) Phase(PHASE)
    • Phoenixcoin (PXC)
    • Feathercoin (FTC)
    • Vertical (VTL)
    • Neblio (NEBL)
    • Xuez (XUEZ)
    • SparksPay (SPK)

Create a Bot

  1. Create a bot and get the bots Token and Client ID: https://discordapp.com/developers/applications/me

    1. After going to the link above click “new application”. Give it a name, picture, and description.

    2. On the side bar navigation menu click "Bot" Click “Add Bot” and click “Yes, Do It!” when the dialog pops up.

    3. Copy down the token used on this page to login and Client ID on the general info page to invite your new bot to your discord server.

  2. invite the bot to your server using the link below and entering the Client ID or generate your own Here:link:

https://discordapp.com/oauth2/authorize?client_id=INSERT_CLIENT_ID_HERE&scope=bot&permissions=27648

Edit Files

  1. Edit and rename ecosystem.config.js.example to ecosystem.config.js in the root folder to match the correct directories for log files and bot root folder.

  2. Edit and rename default.json.example to default.json in /config. You will use the same info in the next step.

    "rvn": {
      "paytxfee": .01
      "config":
        "port": 3335,
        "user": "username",
        "pass": "Do-Not-Use-This-Password-Youll-Be-Hacked-For-all-Teh-Moneys!"
      }
    },
    

    (you can add more coins by following this format and using the exampleTipper.js file in /bot/modules)

  3. set up the wallets config file

    1. In most cases, your wallets data folder can be found in %appdata%

      (default Roaming Folder), e.g. C:\Users\USER\AppData\Roaming\COIN.

    2. Edit or create your COIN.conf file (Where "COIN" is the coin name) to include the following:

      server=1
      par=1
      rpcbind=127.0.0.1
      rpcallowip=127.0.0.1
      rpcport=3335
      rpcuser=<Same-as-you-set-in-config.json>
      rpcpassword=<Same-as-you-set-in-config.json>
      rpcclienttimeout=30
      rpcthreads=<Number-of-Threads>
      rpcworkqueue=1000
      paytxfee=<Amount-to-always-pay-tx-fee>
      
      1. NOTE: for paytxfee to actually work properly use the console or rpc command settxfee number number being the fee of course.

      2. NOTE: if you are using a master node coin you also need to add these extra options into your wallets config file

      staking=0
      enableaccounts=1
      

Install Bot

Auto - Windows

  1. run the windows-install.bat file to install needed tools, Not on windows or don't want to auto install follow the instructions below for manual Installation.

  2. verify the following tools are installed by running the commands below in cmd:

    • git - git --version
    • node - node -v
      • npm - npm -v
        • pm2 - pm2 -v
        • yarn - yarn --version
  3. start the bot with yarn start or pm2 start ecosystem.config.js in the bots root directory

    1. if the bot fails to start and throws missing npm package errors simply run npm install again in the bots root directory

Manual - Linux/Mac

  1. Download and install the required tools listed below:

  2. After the above tools have been installed run npm install in the bots root directory.

    1. this may throw some errors on some systems not all packages are required for some systems, the bot will still run unless it's an absolutely needed dependency.
  3. start the bot with yarn start or pm2 start ecosystem.config.js in the bots root directory

Development

Be sure to run the command below before working on any code, this ensures prettier goes to work and keeps the code to our standard.

yarn install --production=false

to run prettier before submitting your code simply run the following in the bots root directory.

yarn precommit

tipbot's People

Contributors

feltoxxx avatar god-father-xuez avatar msftserver avatar nebliodev avatar zawasp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tipbot's Issues

Cannot read property "send" of undefined | bot.js:100:5

I am receiving the below error. All other steps have worked, have created the coinTipper file, modified the coinD.conf and tipbot config files, bot connects to discord, pm2 launches the bot successfully. It just continually restarts with this one error in the log.

July 25th 2018, 12:30:57 pm: [07-25-2018 12:30 pm PST][TipBot] uncaughtException: TypeError: Cannot read property 'send' of undefined 5|TipBot | July 25th 2018, 12:30:57 pm: C:\Users\User\Downloads\Discord-TipBot-master\Discord-TipBot-master\bot\bot.js:100 5|TipBot | .send('[' + time + ' PST][' + pm2Name + '] uncaughtException: ' + err); 5|TipBot | ^ 5|TipBot | 5|TipBot | TypeError: Cannot read property 'send' of undefined 5|TipBot | at process.on.err (C:\Users\User\Downloads\Discord-TipBot-master\Discord-TipBot-master\bot\bot.js:100:5) 5|TipBot | at emitOne (events.js:121:20) 5|TipBot | at process.emit (events.js:211:7) 5|TipBot | at process._fatalException (bootstrap_node.js:378:26) 5|TipBot | July 25th 2018, 12:30:57 pm: WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names. 5|TipBot | July 25th 2018, 12:30:57 pm: WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode 5|TipBot | July 25th 2018, 12:30:57 pm: [07-25-2018 12:30 pm PST][TipBot] 3 aliases Loaded! 5|TipBot | July 25th 2018, 12:30:57 pm: (node:5124) Warning: N-API is an experimental feature and could change at any time.

Error when run for the first time

node bot.js

aliases:
{ tip: 'tiprvn',
  rvntip: 'tiprvn',
  roletip: 'roletiprvn',
  multitip: 'multitirvn',
  rvnroletip: 'roletiprvn',
  rvnmultitip: 'multitirvn' }
(node:20279) ExperimentalWarning: The http2 module is an experimental API.
unhandledRejection: Error: Incorrect login details were provided.

error ubuntu 16.05

yarn start
/usr/share/yarn/lib/cli.js:45726
let {
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/usr/share/yarn/bin/yarn.js:24:13)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

all step follow

send error in log

Hi there!

first thanks for ur work. im having this problem in error.log

TypeError: Cannot read property 'send' of undefined
at process. (/root/TipBot/bot/bot.js:100:5)
at process.emit (events.js:215:7)
at process._fatalException (internal/process/execution.js:150:25)

could u help me¿?

thanks

Incorrect login details were provided.

I've set the exact same rpc details in the coin.conf as in the default.json but when i run the /bot/bot.js it keeps giving me the error that the login credentials are wrong so i dont think its that..

However, I'm missing a step in the readme where it tells us to edit the bot client id and secret token, where are we supposed to do this?

crazy@ubuntu:~/TipBot$ node ./bot/bot.js
[09-17-2018 03:02 am PST][TipBot] 11 aliases Loaded!
[09-17-2018 03:02 am PST][TipBot] unhandledRejection: Error: Incorrect login details were provided.
[09-17-2018 03:02 am PST][TipBot] uncaughtException: TypeError: Cannot read property 'send' of undefined
/home/crazy/TipBot/bot/bot.js:100
    .send('[' + time + ' PST][' + pm2Name + '] uncaughtException: ' + err);
    ^

TypeError: Cannot read property 'send' of undefined
    at process.on.err (/home/crazy/TipBot/bot/bot.js:100:5)
    at emitOne (events.js:96:13)
    at process.emit (events.js:188:7)
    at process._fatalException (bootstrap_node.js:296:26)

image
image

Unexpected token function

Hello

First of all thank you for this bot! But I'm getting an error I'm not able to fix.
The bot comes online, I can run the command ".tiphelp" but nothings else works. When I go in to the log file I'm getting this error:

0|TipBot | Improper setup of the 'aexTipper.js' plugin. : SyntaxError: Unexpected token function

This is where it throws the error:

image

any idea where I should look at?

Greetings

Error: Configuration property "moderation" is not defined [SOLVED]

Hello,
I am getting this error while running with pm2, yarn and node bot/bot.js

    throw new Error('Configuration property "' + property + '" is not defined');
    ^

Error: Configuration property "moderation" is not defined
    at Config.get (/root/boxytipbot/node_modules/config/lib/config.js:203:11)
    at Object.<anonymous> (/root/boxytipbot/bot/bot.js:8:25)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9```


Thanks for your help!

Help

Please set your Discord Presence to Online to talk to the bot!

It keep saying

How to run on Repl

Hi this isn't so much an issue as me asking for help as to how to get the bot running. I have forked this repo on Repl but when I click run nothing happens, I just get the yarn start message in the console but my bot doesn't come online and I am lost as to how to actually set this up properly. I am a complete noob at this and only started building Discord bots like a week ago so excuse my ignorance lol. Any help or guidance would be greatly appreciated, thank you in advance

error getting balance

Not sure wats going but all commands works except when i do the balance bot responds with error getting balance.

deposit works
tipping works
withdraw works

Add in ability to send RVN Assets in discord

Yo MSFT, haven't seen ya in discord for a while didn't know how else to get in contact with you.

Could you update the tip bot so that users are able to send rvn assets in discord? This would help greatly with asset adoption and trading etc... At least for the memes. Not sure how much code it would take to add this functionality.

Come drop by discord and we can chat.

Bot Error - Node App Instance 0 loop [SOLVED]

I cant seem to pass this error - Codebase, wallet and dependencies installed but still cant seem to get the bot to work.
These errors are found within the pm2 monit section

x TipBot > WARNING: NODE_APP_INSTANCE value of '0'      x
x                      xx did not match any instance config file names.         x
x                      xx PM2 > Change detected on path logs/tipbot-err-0.log   x
x                      xx for app TipBot - restarting                           x
x                      xx TipBot > WARNING: See https://github.com/lorenwest/n  x
x                      xx ode-config/wiki/Strict-Mode                           x
x                      xx PM2 > Stopping app:TipBot id:0                        x
x                      xx TipBot > [01-15-2019 06:25 pm PST][TipBot] 11         x
x                      xx aliases Loaded!                                       x
x                      xx PM2 > pid=19852 msg=failed to kill - retrying in      x
x                      xx NaNms                                                 x
x                      xx PM2 > pid=19852 msg=failed to kill - retrying in      x
x                      xx NaNms                                                 x
x                      xx PM2 > App [TipBot:0] exited with code [0] via         x
x                      xx signal [SIGINT]                                       x
x                      xx PM2 > pid=19852 msg=process killed                    x
x                      xx PM2 > App [TipBot:0] starting in -fork mode-          x
x                      xx PM2 > App [TipBot:0] online                           x

On Send: JSON value is not a boolean as expected

We are using a Dash Fork and on Send function we are getting
JSON value is not a boolean as expected

All other commands seem to work fine.
Any help on what to add to the code would be great.

Use TipBot for Stake

Hi

Awesome work ..

Is this bot not available for POS coin?

Are the alternatives to edit making this bot put POS coin?

Hope you can answer..

Thanks

withdrawl no tx id

when i withdraw no tx id appear, but the coin sent, please tell how to enable the tx id function

custom function example?

theres no documentation on how to implement a custom function, ive got commands down pat, is it possible to get an example script?

Issue [Running Bot]

I have the bot loaded and it showing in the discord.

The following message was shown in discord:

[05-15-2019 05:43 am PST][TipBot] CoinJoinLogged in! Serving in 1 servers
[05-15-2019 05:43 am PST][TipBot] type !tiphelp in Discord for a commands list.

in PM2 log

1|CoinJoin | Loaded 2 chat commands and 0 custom functions.
1|CoinJoin | [05-15-2019 05:43 am PST][TipBot] type !tiphelp in Discord for a commands list.

When the command is given !tiphelp nothing comes back in discord

PM2 screen

status            │ online          
│ name              │ CoinJoin 
│ version           │ 1.0.0   
│ restarts          │ 2455   
│ uptime            │ 2m   
│ script path       │ /home/Desktop/TipBot-master/bot/bot.js 
│ script args       │ N/A                                               │
│ error log path    │ /home/Desktop/TipBot-master/tipbot-err.log │
│ out log path      │ /home/Desktop/TipBot-master/tipbot-out.log │
│ pid path          │ /home/.pm2/pids/CoinJoin-1.pid             │
│ interpreter       │ node                                              │
│ interpreter args  │ N/A                                               │
│ script id         │ 1                                                 │
│ exec cwd          │ /home/Desktop/TipBot-master                │
│ exec mode         │ fork_mode                                         │
│ node.js version   │ 8.11.4                                            │
│ node env          │ development                                       │
│ watch & reload    │ ✔                                                 │
│ unstable restarts │ 0                                                 │
│ created at        │ 2019-05-15T12:43:46.330Z                          │
└───────────────────┴───────────────────────────────────────────────────┘
 Code metrics value 
┌────────────────┬───────────┐
│ Heap Size      │ 23.39 MiB │
│ Heap Usage     │ 70.42 %   │
│ Used Heap Size │ 16.47 MiB │

If I do the command !tiprvn the bot will PM me but won't send me the help commands

Any advice would be great!

Help me tipbot

You mean ?
wallet folder found in %appdata% (default Roaming Folder):

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.