telegram

how to use getChats in tdlib

允我心安 提交于 2020-07-08 09:41:44
问题 I want to use TD Java API in my android project. method "getchats" return list of chat. I dont know how to use this method getchats has 3 parameters: offset_order, offset_chat_id, limit limit is max number of chats, sent by server to my app. what are offset_order and offset_chat_id? i could only find this brief documentation about this method Returns list of chats in the right order, chats are sorted by (order, chat_id) in decreasing order. For example, to get list of chats from the beginning

(python) Telegram bot- how to send messages periodically?

北城余情 提交于 2020-07-06 12:58:47
问题 I have a dilemma regarding my telegram bot. Let's say I have to create a function that will ask, every user connected to the bot, one time per week/month, a question: def check_the_week(bot, update): reply_keyboard = [['YES', 'NO']] bot.send_message( chat_id=update.message.chat_id, text=report, reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True)) # sends the total nr of hours update.reply_text("Did you report all you working hour on freshdesk for this week?",

Telegram Bot in ASP.Net Web Form

≯℡__Kan透↙ 提交于 2020-06-29 03:42:30
问题 I have this "Net Core Console App" code for Telegram Bot class Program { private static readonly TelegramBotClient bot = new TelegramBotClient(MyToken); static void Main(string[] args) { bot.OnMessage += tgramBotTestMSG; bot.StartReceiving(); Console.ReadLine(); bot.StopReceiving(); } private static void tgramBotTestMSG(object sender, MessageEventArgs e) { if (e.Message.Type == Telegram.Bot.Types.Enums.MessageType.Text) PrepareQuestionnaires(e); } public static void PrepareQuestionnaires

Telegram bot- how to send messages Daily

纵然是瞬间 提交于 2020-06-28 09:53:36
问题 I am trying to develop a telegram-bot that send a message every day at a specific time. but it's not working for me. I think the problem is in the time parameter. I used another method of this class and they were working well but run_daily is not working. :( import telegram.ext from telegram.ext import Updater from datetime import time updater = Updater('My Token', use_context=True) job = updater.job_queue def callback_minute(context: telegram.ext.CallbackContext): context.bot.send_message

Is it possible to create a telethon client starting from auth_key only?

泪湿孤枕 提交于 2020-06-28 09:39:08
问题 The hello world of telethon looks like: from telethon import TelegramClient client = TelegramClient(name, api_id, api_hash) async def main(): # Now you can use all client methods listed below, like for example... await client.send_message('me', 'Hello to myself!') with client: client.loop.run_until_complete(main()) Like this it will ask me to sign in the first time, by providing phone and confirmation code. Next time it will reuse information stored locally. What i want is to give it a auth

how to create a bot with in telegram with botfather and using only a code?

浪子不回头ぞ 提交于 2020-06-28 04:14:08
问题 There are some steps that has been mentioned in telegram api for creating a bot using a botfather. I was hoping if there is a way that these steps can turn into code. to be specific, i want to get a token from botfather using code and then later in the code i use this token. 回答1: Yes this is very possible. You would however need to build a Telegram Client, that will interact with BotFather. The interaction should be easy to script, as BotFather interaction follows just a few simple steps 来源:

How can I get a list of all bots registered with BotFather?

北城以北 提交于 2020-06-28 03:41:40
问题 My task is to get a list of all user bots, after authorization in the telegram client through the API. I looked in the documentation for a specific method, but did not find it. Can someone tell me how this can be done, and is it possible at all? 回答1: I don't think there's a direct API for that unfortunately. But consider automating the interaction with the BotFather to gather the list programmatically. Here is a sample script in Telethon from telethon import TelegramClient, events API_ID = ..

Telegram authorization without default button

梦想与她 提交于 2020-06-27 07:14:29
问题 The only documented way to use Telegram 3-rd party authorization is to use their script that is being provided at https://core.telegram.org/widgets/login This script (as I digged) works in pretty strange way It renders "Log in with Telegram" button inside the iframe with another extra script that loads some Telegram entities to work with (like TWidgetLogin , TSticker (?) , TVideo (??) , TAudio (???) and some others). By clicking on button, this iframe opens new window that is performing

Telegram authorization without default button

Deadly 提交于 2020-06-27 07:14:07
问题 The only documented way to use Telegram 3-rd party authorization is to use their script that is being provided at https://core.telegram.org/widgets/login This script (as I digged) works in pretty strange way It renders "Log in with Telegram" button inside the iframe with another extra script that loads some Telegram entities to work with (like TWidgetLogin , TSticker (?) , TVideo (??) , TAudio (???) and some others). By clicking on button, this iframe opens new window that is performing

How to send message from Website To Telegram APP

[亡魂溺海] 提交于 2020-06-25 04:18:05
问题 I have a share button in my website and I want to send a specific message to Telegram APP contacts (when I open website in Mobile) The Problem is I didnt find the complete code and it just open the APP in the mobile my code is : <a href="tg://" id="telegram_share" class="mobileShare" title="inviteFriends" alt="telegram_share"></a> as you see I didnt find proper command for sending message in href property for example I found something simillar for adding sticker like : <a class="tgme_action