Coder Social home page Coder Social logo

图片发送 about message-pusher HOT 4 OPEN

Samiya321 avatar Samiya321 commented on September 26, 2024
图片发送

from message-pusher.

Comments (4)

fghwett avatar fghwett commented on September 26, 2024

按照telegram和企业微信官方的接口来说,是支持以markdown的形式发送图文的,你现在是有测试不行吗

from message-pusher.

Samiya321 avatar Samiya321 commented on September 26, 2024

按照telegram和企业微信官方的接口来说,是支持以markdown的形式发送图文的,你现在是有测试不行吗
https://developer.work.weixin.qq.com/document/path/90236#支持的markdown语法
https://core.telegram.org/bots/api#markdownv2-style
https://core.telegram.org/bots/api#markdownv2-style

我似乎在telegram和企业微信的API文档中的Markdown部分并没有发现它支持发送图文,你指的是将图片以超链接形式发送吗?

from message-pusher.

fghwett avatar fghwett commented on September 26, 2024

image
tg有看到支持markdown图片的写法

![图片描述](图片链接)

企业微信文档中没写,可能是不支持,你可以先试一下,如果不行,你再看看需要哪个形式的消息,我再加一下。目前源码作者很忙,估计改了也要很久才更新,你要做好心理准备。

from message-pusher.

Samiya321 avatar Samiya321 commented on September 26, 2024

image tg有看到支持markdown图片的写法

![图片描述](图片链接)

企业微信文档中没写,可能是不支持,你可以先试一下,如果不行,你再看看需要哪个形式的消息,我再加一下。目前源码作者很忙,估计改了也要很久才更新,你要做好心理准备。

import telebot
from telebot import asyncio_helper

# Replace 'YOUR_BOT_TOKEN' with your bot's token
bot_token = ""


asyncio_helper.proxy = "http://127.0.0.1:7890"
bot = telebot.TeleBot(bot_token)

# Replace 'YOUR_CHAT_ID' with the chat ID where you want to send the message
chat_id = ""

# Markdown formatted message
message_text = """
*Bold text*
_Italic text_
[Link](https://jp.mercari.com/item/m67531566397)
![Image](https://static.mercdn.net/c!/w=240,f=webp/thumb/photos/m56996954488_1.jpg)
"""

# Send the message
bot.send_message(chat_id, message_text, parse_mode="Markdown")

image

测试了一下telegram的markdown图片发送,实际也还是以超链接的形式被发送... 似乎无效

from message-pusher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.