telegram-bot

How to solve disturbance in my bot in c#?

泪湿孤枕 提交于 2019-11-26 23:07:39
I made a telegram Bot. In fact, the bot is a game, play guess certain words.But the problem is when I add robots to two different groups (as an administrator) or Two user-Telegram, separately ،use of the bot and start bot,Puts the impact of what they played together.Game one person is caused a disturbance in next person game. for example: if john start my bot in Mobile and desired_word for john is Newyork and length=7 ,when sara start my bot in Mobile. Len_desiredwords for john for example Become to 5 . library = NetTelegramBotApi 4.0.0 vs = 2013 v4; Do not know what to do. code: using System;

create dynamic Keyboard telegram bot in c# , MrRoundRobin API

守給你的承諾、 提交于 2019-11-26 21:24:33
问题 I want to create custom keyboard in telegram.bot For example: We have an array of string that gets from the database or other recurses how we can push data from the array to InlineKeyboardMarkup in for loop or function //array of Button string[] ButtonItem= new string[] { "one", "two", "three", "Four" }; //function or solution to create keyboard like this var keyboard = new InlineKeyboardMarkup(new[] { new[] { new InlineKeyboardButton("one"), new InlineKeyboardButton("two"), }, new[] { new

How to obtain Telegram chat_id for a specific user?

六月ゝ 毕业季﹏ 提交于 2019-11-26 15:45:02
问题 How to obtain user chat_id in Telegram bot API? The documentation says: Integer | Unique identifier for the message recipient — User or GroupChat id 回答1: The message updates you receive via getUpdates or your webhook will contain the chat ID for the specific message. It will be contained under the message.chat.id key. This seems like the only way you are able to retrieve the chat ID. So if you want to write something where the bot initiates the conversation you will probably have to store the

Telegram Bot - how to get a group chat id?

人盡茶涼 提交于 2019-11-26 15:06:43
问题 I've been using telegram_bot, and trying to get groupChat id to send notifications to group chat, but don't know which methods I have to use for it. For getting chat id I use to message.chat.id when the bot participated in the chat but which I have to use for getting group chat id can't find/ 回答1: In order to get the group chat id, do as follows: Add the Telegram BOT to the group. Get the list of updates for your BOT: https://api.telegram.org/bot<YourBOTToken>/getUpdates Ex: https://api

How to solve disturbance in my bot in c#?

时间秒杀一切 提交于 2019-11-26 08:36:52
问题 I made a telegram Bot. In fact, the bot is a game, play guess certain words.But the problem is when I add robots to two different groups (as an administrator) or Two user-Telegram, separately ،use of the bot and start bot,Puts the impact of what they played together.Game one person is caused a disturbance in next person game. for example: if john start my bot in Mobile and desired_word for john is Newyork and length=7 ,when sara start my bot in Mobile. Len_desiredwords for john for example