telegram/

directory
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2023 License: MIT

README

Telegram Push Bot

telegram-bot

you can use this bot to create your own alert channel, then you can push text message to GraphqlAPI, everyone that has joint this channel will receive what you pushed.

This is a side-project JUST FOR FUN, this service will keep running for a long time, but does not provide any guarantees.

Summary:

Usage

Step:

  1. add bot
  2. create new channel
  3. push msg to GraphQL API

Other methods:

  • list all channels
  • refresh channel's join_key and push_token
  • quit a channel
  • kick someone out of a channel
Add Bot

Search laisky_alert_bot:

telegram-bot

Create new channel
  1. /monitor
  2. 1 - <your_new_channel_name>

telegram-bot

you will get your new channel's:

  • name
  • push_token
  • join_key
List all channels you have joint
  1. /monitor
  2. 2

telegram-bot

Push msg to a channel

this operation will notify everyone in this channel.

open GraphQL UI: https://blog.laisky.com/graphql/ui/

mutation push_msg {
  TelegramMonitorAlert(
    type: "hello",
    token: "hrffbxeFNjwTGIienoIE"
    msg: "hello, JEDI"
  ) {
    name
  }

telegram-bot

receive msg:

telegram-bot

Quit a channel
  1. /monitor
  2. 5 - <channel_name>

telegram-bot

Join a channel
  1. /monitor
  2. 3 - <channel_name>:<join_key>

telegram-bot

Kick someone out of a channel

this operation will notify everyone in this channel.

  1. /monitor
  2. 6 - <channel_name>:<user_telegram_id>

telegram-bot

You can use GraphQL API to load all users that in this channel:

query telegram {
  TelegramAlertTypes(
    name: "hello",
  ) {
    name
    sub_users {
      name
      telegram_id
    }
  }
}

telegram-bot

Refresh channel's join_key and push_token

this operation will notify everyone in this channel.

  1. /monitor
  2. 4 - <channel_name>

telegram-bot

Directories

Path Synopsis
Package telegram is telegram server.
Package telegram is telegram server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL