Telegram Push Bot
![telegram-bot](https://s1.laisky.com/uploads/2019/10/telegram-bots-father.png)
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:
- add bot
- create new channel
- 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](https://s3.laisky.com/uploads/2019/10/bot-1.jpg)
Create new channel
/monitor
1 - <your_new_channel_name>
![telegram-bot](https://s2.laisky.com/uploads/2019/10/bot-2.jpg)
you will get your new channel's:
List all channels you have joint
/monitor
2
![telegram-bot](https://s2.laisky.com/uploads/2019/10/bot-3.jpg)
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](https://s2.laisky.com/uploads/2019/10/bot-4.jpg)
receive msg:
![telegram-bot](https://s2.laisky.com/uploads/2019/10/bot-10.jpg)
Quit a channel
/monitor
5 - <channel_name>
![telegram-bot](https://s2.laisky.com/uploads/2019/10/bot-5.jpg)
Join a channel
/monitor
3 - <channel_name>:<join_key>
![telegram-bot](https://s3.laisky.com/uploads/2019/10/bot-6.jpg)
Kick someone out of a channel
this operation will notify everyone in this channel.
/monitor
6 - <channel_name>:<user_telegram_id>
![telegram-bot](https://s3.laisky.com/uploads/2019/10/bot-7.jpg)
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](https://s3.laisky.com/uploads/2019/10/bot-8.jpg)
Refresh channel's join_key and push_token
this operation will notify everyone in this channel.
/monitor
4 - <channel_name>
![telegram-bot](https://s3.laisky.com/uploads/2019/10/bot-9.jpg)