This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

bot-notify
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

bot-notify

机器人消息通知

目前支持:

  • [x] 企业微信群机器人
  • [x] 飞书自定义机器人
  • [x] 钉钉自定义机器人
  • [x] Telegram Bot
  • [x] Discord Webhook

安装

npm install bot-notify

通用配置

{
  proxy?:string // http://127.0.0.1:1087
}

企业微信群机器人

  • 文档:官方文档

  • 参数

    {
      token: string;
    }
  • 示例

    import { WecomNotify } from 'bot-notify';
    
    const wecomNotify = new WecomNotify({ token: 'xxx' });
    
    await wecomNotify.sendText('Hello World');
    
    // 其他类型消息 sendXXX

飞书自定义机器人

  • 文档 官方文档

  • 参数

    {
      token: string,
      secret?: string,
    }
  • 示例

    import { LarkNotify } from 'bot-notify';
    
    const larkNotify = new LarkNotify({ token: 'xxx', secret: 'xxx' });
    
    await larkNotify.sendText('Hello World');
    
    // 其他类型消息 sendXXX

钉钉自定义机器人

  • 文档:官方文档

  • 参数

    {
      token: string,
      secret?: string,
    }
  • 示例

    import { DingNotify } from 'bot-notify';
    
    const dingNotify = new DingNotify({ token: 'xxx', secret: 'xxx' });
    
    await dingNotify.sendText('Hello World');
    
    // 其他类型消息 sendXXX

Telegram Bot

  • 文档:官方文档

  • 参数

    {
      token: string,
      chat_id?: string
    }
  • 示例

    import { TelegramNotify } from 'bot-notify';
    
    const tgNotify = new TelegramNotify({ token: 'xxx' });
    
    await tgNotify.sendText('Hello World');
  • 如何创建 Telegram Bot

    TODO

  • 如果获取 groupchannelchat_id

    TODO

Discord Webhook

  • 文档:官方文档

  • 参数

    {
      id: string, // {webhook.id}
      token: string, // {webhook.token}
    }
  • 示例

    import { DiscordNotify } from 'bot-notify';
    
    const disNotify = new DiscordNotify({ id: 'xxx', token: 'xxx' });
    
    await disNotify.sendText('Hello World');
    
    // 其他类型消息 sendXXX
  • 删除消息

    TODO

  • 编辑消息

    TODO

License

MIT License - 0ahz

Readme

Keywords

none

Package Sidebar

Install

npm i bot-notify

Weekly Downloads

10

Version

1.0.6

License

MIT

Unpacked Size

37.1 kB

Total Files

24

Last publish

Collaborators

  • pengg