Title Loading...

  1. Time Loading...
  2. Wordcount Loading...
  3. Pluto

Catalogue

用Telegram Bot API实现的机器人框架

近几日注册了Telegram,了解到他官方提供了机器人的Restful API。便想着自己写一个机器人。

于是翻阅Telegram的官方文档,大概花了两日,基本实现了框架的功能,并托管到Github。

项目地址: teelebot

体验地址: teelebot体验群(t.me/isteelebot)

Telegram Bot API官方提供了许多Method,目前封装实现了以下几个:

  • getMe
  • getUpdates
  • getFile & downloadFile
  • sendMessage
  • sendPhoto
  • sendDocument
  • kickChatMember
  • unbanChatMember
  • leaveChat
  • getChat
  • getChatAdministrators
  • getChatMembersCount
  • getChatMember
  • setChatPermissions
  • restrictChatMember
  • promoteChatMember
  • pinChatMessage
  • unpinChatMessage

目标是封装官方所有的Method。

本框架基本实现了插件系统,目前自带插件有以下几个:

  • Menu - 自动生成的插件菜单
  • Chat - 调用 青云客聊天机器人API 实现的对话功能
  • Hello - Hello World插件例子
  • Firefoxmoniter - 调用 Firefox Moniter ,搜索自2007年起的公开数据外泄事件当中是否包含你的电子邮件。
  • Bing - 调用第三方Bing壁纸接口 bing 获取每日必应壁纸

框架还很简陋,还需要不断完善,如果您发现有任何问题,欢迎给我提 Issue 或 Pull Request。

当然,也欢迎 Fork 和 Star。