telegram

Telegram group ban/boot/kick user

纵饮孤独 提交于 2020-01-14 14:14:03
问题 I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group. I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API? 回答1: You can use kickChatMember to remove a user from a group. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 来源: https://stackoverflow.com/questions/39817082/telegram-group-ban-boot-kick-user

How to hide Telegram BOT commands when it is part of a group?

不打扰是莪最后的温柔 提交于 2020-01-13 09:04:51
问题 I'm trying to use a Telegram BOT to send messages to a group. First, I thought that it'd be enough to know the group chat id to accomplish that, but it's not. The BOT MUST be part of that group. OK, it kind of make sense, but the problem is: When you add a BOT into a group (a large group in this case) everyone start seeing a new icon on their devices, a "slash" icon. And what do they do ? They click on it, see the list of commands, choose one of them, and all of a sudden everyone is getting a

How to hide Telegram BOT commands when it is part of a group?

你离开我真会死。 提交于 2020-01-13 09:03:20
问题 I'm trying to use a Telegram BOT to send messages to a group. First, I thought that it'd be enough to know the group chat id to accomplish that, but it's not. The BOT MUST be part of that group. OK, it kind of make sense, but the problem is: When you add a BOT into a group (a large group in this case) everyone start seeing a new icon on their devices, a "slash" icon. And what do they do ? They click on it, see the list of commands, choose one of them, and all of a sudden everyone is getting a

Telegram add member to channel by bot api

99封情书 提交于 2020-01-13 05:52:26
问题 I have seen this question, but unfortunately no one answered: How to add user to my telegram channel by telegram api? I have created a bot and a channel in telegram. Then I added the bot to channel's administrators. How can I add members to channel by my bot APIs?! Programming languages: PHP, Python, C++:Qt, Java, C# (every of them or any library) 回答1: Unfortunately, you can't do anything except posting to channel via bot using Telegram Bot API. Hovewer, you may take a look at Telegram-CLI

How to send an Embedded Image along with text in a Message via Telegram Bot API

对着背影说爱祢 提交于 2020-01-12 05:01:05
问题 Using Telegram Bot API, I'm aware that it is possible to send an image via https://core.telegram.org/bots/api#sendphoto However, how can I embed a remote image into a formatted message? The message I am looking to send, can be compared to a news article with a title in bold, an image, and a longer text with links. I figured out how to create bold text and links with markdown, but I'm failing at inserting images. How can we do that? 回答1: you must set ParseMode in HTML and set your Image Url in

Telegram Api - Creating an Authorization Key 404 error

时光毁灭记忆、已成空白 提交于 2020-01-11 10:44:09
问题 I am trying to write a simple program in python to use telegram api, (not bot api, main messaging api) Now i have written this code #!/usr/bin/env python import socket import random import time import struct import requests def swap64(i): return struct.unpack("<L", struct.pack(">L", i))[0] MESSAGE = '0000000000000000'+format(swap32(int(time.time()*1000%1000)<<21|random.randint(0,1048575)<<3|4),'x')+format(swap32(int(time.time())),'x')+'140000007897466068edeaecd1372139bbb0394b6fd775d3' res =

php extract Emoji from a string

被刻印的时光 ゝ 提交于 2020-01-11 05:48:08
问题 I have a string contain emoji. I want extract emoji's from that string,i'm using below code but it doesn't what i want. $string = "😃 hello world 🙃"; preg_match('/([0-9#][\x{20E3}])|[\x{00ae}\x{00a9}\x{203C}\x{2047}\x{2048}\x{2049}\x{3030}\x{303D}\x{2139}\x{2122}\x{3297}\x{3299}][\x{FE00}-\x{FEFF}]?|[\x{2190}-\x{21FF}][\x{FE00}-\x{FEFF}]?|[\x{2300}-\x{23FF}][\x{FE00}-\x{FEFF}]?|[\x{2460}-\x{24FF}][\x{FE00}-\x{FEFF}]?|[\x{25A0}-\x{25FF}][\x{FE00}-\x{FEFF}]?|[\x{2600}-\x{27BF}][\x{FE00}-\x{FEFF}

Error:Execution failed for task

僤鯓⒐⒋嵵緔 提交于 2020-01-11 02:08:09
问题 I get this problem when I use source code of Telegram in Android studio. So I use android studio preview 3.0.0 beta 2, gradle 4.1-all.zip, mainsdk:15. I did everything but it's not working properly. Error is : Error:Execution failed for task: TMessagesProj:transformDexArchiveWithExternalLibsDexMergerForDebug. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex build.gradle file is : buildscript { repositories {

Where to find the Telegram Api Key

时光怂恿深爱的人放手 提交于 2020-01-07 09:55:09
问题 I am trying to find the Api Key for Telegram but I cannot find it. Where do I find it on the website? If I use the Api Id, I get the error Incorrect Token Format in the C# Console Application. 回答1: In special official bot: https://telegram.me/BotFather Additional information on official Telegram FAQ page: https://core.telegram.org/bots/faq#how-do-i-create-a-bot 回答2: If someone knows how to make the images a bit smaller through formatting please go ahead and do so because that size is insane.

Where to find the Telegram Api Key

老子叫甜甜 提交于 2020-01-07 09:52:33
问题 I am trying to find the Api Key for Telegram but I cannot find it. Where do I find it on the website? If I use the Api Id, I get the error Incorrect Token Format in the C# Console Application. 回答1: In special official bot: https://telegram.me/BotFather Additional information on official Telegram FAQ page: https://core.telegram.org/bots/faq#how-do-i-create-a-bot 回答2: If someone knows how to make the images a bit smaller through formatting please go ahead and do so because that size is insane.