V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
wxmomomowx
V2EX  ›  Node.js

nodejs TDlib, 请问 用这个 https://github.com/Bannerets/tdl 如何才能发图片呢?

  •  
  •   wxmomomowx · Dec 5, 2022 · 5671 views
    This topic created in 1241 days ago, the information mentioned may be changed or developed.
    await client.invoke({
    _: 'sendMessage',
    chat_id: 123456789,
    input_message_content: {
    _: 'inputMessageText',
    text: {
    _: 'formattedText',
    text: '👻'
    }
    }
    })

    这个可以发文字, 但是小白 nodejs 搞不明白如何才能发图片,
    这个之官方的 TDlib 看不太懂,https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1input_message_photo.html

    有懂的大神 带带吗?
    3 replies    2022-12-08 09:52:09 +08:00
    Giftina
        1
    Giftina  
       Dec 5, 2022
    推荐使用 `node-telegram-bot-api` 这个 sdk ,有直接封装好的方法 `sendPhoto`
    wxmomomowx
        2
    wxmomomowx  
    OP
       Dec 6, 2022
    @Giftina 不一样的, 你推荐的是 bot sdk ,想用的是 TDlib.
    ChevalierLxc
        3
    ChevalierLxc  
       Dec 8, 2022
    看看这个 Issue 是不是对你有帮助
    https://github.com/Bannerets/tdl/issues/109
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4099 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 00:05 · PVG 08:05 · LAX 17:05 · JFK 20:05
    ♥ Do have faith in what you're doing.