Coder Social home page Coder Social logo

rusq / tbcomctl Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 3.0 188 KB

Telegram Bot Common Controls (using github.com/tucnak/telebot)

License: MIT License

Go 100.00%
library golang telegram-bot telebot common-controls logging picklist rating comctl

tbcomctl's Introduction

Common Controls Library for Telebot

Library provides common controls to use with Telebot library.

Controls:

  • Picklist - add inline keyboard to bots messages.
  • Post Buttons - add buttons to your channel posts.
  • Rating - rating buttons for channel posts.
  • Keyboard - a convenient way to create a keyboard.
  • Input - ask user for input and process the answer in OnText.

Abstractions:

  • Form (combines other controls into a pipeline, see examples)

Utilities:

  • Subscription - check if user is subscribed to the channels of interest.
  • Middleware - some helpful middleware functions.
  • Helper functions for logging, etc.

Breaking Changes in V4

Controls now operate on Interfaces defined in interface.go rather than functions. There's a new convenience structure TVC which can be used to wrap the functions when updating to v4.

See examples for usage.

Installation

For Telebot v3:

go get github.com/rusq/tbcomctl/v4

For Telebot v2:

go get github.com/rusq/tbcomctl
// or
go get github.com/rusq/tbcomctl/v2

v2 is not actively developed, but you're more than welcome to submit your PRs.

Usage

For usage - see examples.

tbcomctl's People

Contributors

rajiteh avatar rusq avatar

Stargazers

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

Watchers

 avatar  avatar  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.