Giter Site home page Giter Site logo

dawgdemi / telegraml-dashboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nv-vn/telegraml-dashboard

0.0 0.0 0.0 36 KB

A set of extensions for TelegraML for automatically generating a web dashboard for your bot

License: GNU General Public License v2.0

Makefile 10.42% OCaml 89.58%

telegraml-dashboard's Introduction

telegraml-dashboard

A set of extensions for TelegraML for automatically generating a web dashboard for your bot

Features

  • Default "run" function for bots
  • Compatible with normal TelegraML interface
  • Automatically generate a web interface for your bot, including
    • Viewing bot info/stats
      • Username
      • Uptime
    • Toggling (enabling/disabling) commands
    • Leaving groups

Screenshots

Dashboard page showing 2 commands and 1 group

Porting TelegraML bots

In order to port a bot from standard TelegraML to TelegraML-dashboard, you first need to add the ocamlfind package telegraml-dashboard to your build system. Then, add the following line to your code:

open TelegramDashboard

Next, you need to switch from using the normal Api.Mk functor to using MkDashboard instead. The Api.BOT that you pass to it can remain 100% the same and all calls into to the resulting module should remain unaffected by the change.

Finally, you need to replace your main function with one that will start the Opium server up. A default function for this is exposed by the generated module from MkDashboard:

val run : ?log:bool -> unit -> unit

The ?log parameter will allow you to enable or disable logging API errors to stdout.

telegraml-dashboard's People

Contributors

nv-vn avatar dawgdemi 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.