dieletro / tinjecttelegram_delphi Goto Github PK
View Code? Open in Web Editor NEWLMCODE
Home Page: http://www.lmcode.com.br
License: GNU General Public License v3.0
LMCODE
Home Page: http://www.lmcode.com.br
License: GNU General Public License v3.0
TJSONStringHack(LValue).Value := '';
TJSONStringHack(LValue).{$Ifdef VER330}FValue{$else}Value{$endif} :=AValue;
left side cannot have value
Hello Sir and thanks for your great work,
I have a question that has been bothering me for several hours.
The program works properly as long as the connection to the Telegram server is established, but if for any reason the connection is interrupted for even a moment and then it is established, it will no longer be able to respond to the requests that are sent from clients. What is your solution to solve this problem?
When using version 1.4.2 the option "Enviar Texto c/Botones" (TtdReplyKeyboardMarkup), doesn't works .
It seems the new property request_user is not accepted by the API.
TInjectTelegramBotReceiverBase.ReadUpdates [ Access violation at address 0078B708 in module 'ExemplosTInjectTelegram.exe'. Read of address 00000000]
Hello Sir,
When I try to use CopyMessage, the Execute command returns a Json value in the form of {"message_id":14} and naturally it cannot convert it to Int64 and an error occurs. To temporarily solve this problem, I have changed the TInjectTelegramBot.CopyMessage method located in the TInjectTelegram.Bot.Impl unit to the following form and decided to inform you about this bug.
function TInjectTelegramBot.CopyMessage(const ChatId, FromChatId: TtdUserLink;
const MessageId: Int64; const Caption: string; const ParseMode: TtdParseMode;
const CaptionEntities: TArray; const DisableWebPagePreview,
DisableNotification: Boolean; const ReplyToMessageId: Int64;
const AllowSendingWithoutReply: Boolean; ReplyMarkup: IReplyMarkup;
const ProtectContent: Boolean): Int64;
Var
LTmpJson: String;
LJsonResult : string;
LJsonObj : TJsonObject;
begin
Logger.Enter(Self, 'CopyMessage');
LTmpJson := TJsonUtils.ArrayToJString(CaptionEntities);
LJsonResult := GetRequest.SetMethod('copyMessage') //
.AddParameter('chat_id', ChatId, 0, True) //
.AddParameter('from_chat_id', FromChatId, 0, True) //
.AddParameter('message_id', MessageId, 0, True) //
.AddParameter('caption', Caption, '', False) //
.AddParameter('parse_mode', ParseMode.ToString, '', False) //
.AddParameter('caption_entities', LTmpJson, '', False) //
.AddParameter('disable_web_page_preview', DisableWebPagePreview, False, False) //
.AddParameter('disable_notification', DisableNotification, False, False) //
.AddParameter('reply_to_message_id', ReplyToMessageId, 0, False) //
.AddParameter('allow_sending_without_reply', AllowSendingWithoutReply, False, False) //
.AddParameter('protect_content ', ProtectContent, False, False) //
.AddParameter('reply_markup', TInterfacedObject(ReplyMarkup), nil, False) //
.Execute; // {"message_id":14}
LJsonObj := TJSONObject.ParseJSONValue(LJsonResult) As TJSONObject;
try
Result := LJsonObj.GetValue('message_id');
finally
LJsonObj.Free
end;
Logger.Leave(Self, 'CopyMessage');
end;
D10.2.3
I put my token and my id
on start i get Certificate exception server certificate invalid or not present
Can you also elaborate on the theory behind your software?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.