This code is based on kayabaNerve Tip Bot (https://github.com/kayabaNerve/tip-bot) with a lot of changes, from staking to true wallet management based on raw transactions. All references to ERC20 are removed.
To install the bot:
- Install Komodo and run your asset chain, then:
- Edit the conf file to add
server=1,rpcuser=user, andrpcpass=pass(with your own username and password). - Start the daemon.
- Move
settings.example.jsontosettings.json. - Edit the
settings.jsonfile'scoinvar to have:symbolset to the coin's symbol ("BTC").decimalsset to the amount of the coin's decimals (8). Optionally, you may set a lower amount of decimals so users can't tip satoshis.portset to the daemon's RPC port (8337).userset to the username you set in the conf file ("user").passset to the password you set in the conf file ("pass").
- Edit the conf file to add
- Create a Discord Bot User.
- Go to https://discordapp.com/developers/applications/me.
- Click
New App. - Enter a name, and optionally, upload an icon.
- Click
Create a Bot User. - Grab the
Client IDfrom the top, and go to this link: https://discordapp.com/oauth2/authorize?client_id=!!CLIENT_ID!!&scope=bot&permissions=68672, after replacing !!CLIENT_ID!! with the bot's client ID. This will allow you to add the bot to a server with the proper permissions of Read Messages/Send Messages/Add Reactions (the last one is only necessary if you use giveaways). - Edit the
settings.jsonfile'sdiscordvar to include:tokenset to the bot user token. This is not the client user.userset to the value gotten by right-clicking the bot on your server and clickingCopy ID. This requiresDeveloper Modeto be enabled on your Discord client.
- Set up any channel locked commands in
settings.json'scommandsvar.- If you wish to lock a command to a channel, edit
exampleto be the name of the command, andROOM IDto be the value gotten from right-clicking a room and clickingCopy ID. You can add multiple channel IDs to the array. - To setup more channel locks, simply copy the
exampletemplate and fill it our properly.
- If you wish to lock a command to a channel, edit
- Install NodeJS dependencies via
npm i.discord.jswill print several warnings about requiring a peer but none was installed. These are normal, and refer to optional packages for connecting to voice channels, something we don't do.
Want to donate? I accept BTC => 3G4oGSVuY2DmAUSzmvj8qJ7vd9KSaTR2NP