GithubHelp home page GithubHelp logo

lntip's Introduction

Welcome to lntip 👋

Version License: MIT

lntip is a bot that allows you to tip Discord users with Bitcoin through the Lightning Network

Demo

Join this Discord server to test it out!

Commands

!lntip

Shows help message

!deposit <amount>

Deposit sats in your account.

!tip <@user> <amount>

Send a tip to a user.
You can also reward users by reacting with a lntip<amount> emoji on their messages.

!balance

Check your balance.

!withdraw <invoice>

Withdraw sats to your wallet.
There is a fixed fee of 10 sats per withdrawal.

Usage

There are two ways to use this bot, either self-hosted or using the hosted version.

Hosted

Simply invite the bot to your server using this URL.

https://discord.com/api/oauth2/authorize?client_id=932252820768448552&permissions=137439276096&scope=bot

Self-hosted using Docker

You need:

  • Docker & docker-compose
  • A Bitcoin node (Bitcoin Core recommended)
  • An LND node (With Tor recommended)

Here is a docker-compose.yml sample, edit it to your needs.

version: "3.1"
services:
  db:
    container_name: lntipdb
    image: mariadb
    volumes:
      - ./data:/var/lib/mysql
    environment:
      - MARIADB_ROOT_PASSWORD=your_password
    ports: # optional
      - "127.0.0.1:3306:3306"
    networks:
      - db
  lntip:
    container_name: lntip
    build:
      context: lntip
      dockerfile: Dockerfile
    volumes:
      - ./config.yml:/lntip/config.yml
      - /path/to/tls.cert:/lntip/tls.cert
      - /path/to/macaroons/mainnet:/lntip/macaroons
    networks:
      - db
      - lnd

networks:
  db:
  lnd:
    external: true

Then you must configure a config.yml. Here is a sample:

bot:
  token: your.discord.token

database:
  name: lntip
  host: db
  port: 3306
  user: root
  password: your_password

lnd:
  host: lnd
  tls_path: /lntip/tls.cert
  macaroon_path: /lntip/macaroons
  network: mainnet

Start the database and the bot:

$ docker-compose up -d --build

Initialize the database:

# Create database
echo 'CREATE DATABASE lntip' | docker exec -it lntipdb mysql -uroot -pyour_pasword

# Run SQL migrations
docker run -v $PWD/migrations:/migrations --net=host migrate/migrate -path=/migrations/ -database "mysql://root:your_password@(localhost:3306)/lntip" up

🎉

Author

👤 Aurèle Oulès

License

MIT - Aurèle Oulès

lntip's People

Contributors

aureleoules avatar

Stargazers

Gábor Mihálcz 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.