Git Product home page Git Product logo

superhero-bot-boilerplate's Introduction

Superhero Bot Boilerplate

Table of contents

Introduction

This is a boilerplate project to create a new Superhero bot using matrix-bot-sdk. It already implements a sample bot, ae_wallet, which enables Superhero Wallet connection, balance check and transfer.

Prerequisites

First install and run your own Matrix homeserver, the suggested one is Synapse. There are different ways to start your own Synapse server and one is explained in the following Docker hub: https://hub.docker.com/r/matrixdotorg/synapse

Install and run Element UI, the suggested Matrix client. The following guide explains how to install it: https://github.com/element-hq/element-web/blob/develop/docs/install.md.

Create a bot account on Matrix and get an access token using the following guide: https://t2bot.io/docs/access_tokens. If you used the matrixdotorg/synapse Docker image you can simply run the command register_new_matrix_user to create a new user:

Getting started

First, download and install Node.js.

Clone superhero-bot-boilerplate repository.

git clone https://github.com/superhero-com/superhero-bot-boilerplate

Install the required dependencies with npm.

npm i

Run the project in development mode with hot reload.

npm run dev

Setup environment variables by creating a new .env file (see .env.example file).

How to

New bots can be added by exending the base class BaseBot present in the bots/@base folder which offers a standardized way to implement commands.

The bot needs to be connected to a user to properly work, check index.ts for a complete sample of ae_wallet bot.

End-to-end encryption

Bot supports End-to-end encrypted messages. Be sure to back up BOT_STORAGE_FILE and BOT_ENCRYPTION_DIR to not lose encryption data.

superhero-bot-boilerplate's People

Contributors

michele-franchi avatar

Watchers

Ivaylo Badinov avatar Marco Walz avatar  avatar Paolo 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.