Giter Site home page Giter Site logo

dieletro / tinjecttelegram_delphi Goto Github PK

View Code? Open in Web Editor NEW
57.0 14.0 18.0 13.71 MB

LMCODE

Home Page: http://www.lmcode.com.br

License: GNU General Public License v3.0

Pascal 98.28% CSS 0.40% HTML 0.64% JavaScript 0.69%
telegram telegram-bot telegram-bot-api telegram-bots telegrambot telegram-for-delphi telegram4delphi tinjecttelegram-delphi delphi telegram-delphi

tinjecttelegram_delphi's People

Contributors

dieletro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tinjecttelegram_delphi's Issues

D10.2.3

TJSONStringHack(LValue).Value := '';
TJSONStringHack(LValue).{$Ifdef VER330}FValue{$else}Value{$endif} :=AValue;
left side cannot have value

Telegram bot management in non-stable networks

Hello Sir and thanks for your great work,
I have a question that has been bothering me for several hours.

Question:

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?

Erro

TInjectTelegramBotReceiverBase.ReadUpdates [ Access violation at address 0078B708 in module 'ExemplosTInjectTelegram.exe'. Read of address 00000000]

Bug in TInjectTelegramBot.CopyMessage

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;

THTTPClient.DoValidateServerCertificate

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?

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.