TMessages = class

Class describing system messages (adrik logs)

Name Result Description Code Params Examples
Add - Adding msg to logs
procedure Add(const Sender, Text: string; MessageType: TMessageType; Color: Integer = -1);

Sender - message owner
Text - message content
MessageType - type of logs (mtSystem, mtAll etc.)
Color - color of msg

Examples not found
GetMessage TChatMessage Getting message from logs by index.
function GetMessage(Index: Integer; MessageType: TMessageType): TChatMessage;

Index - index of msg
MessageType - type of msg (mtSystem, mtAll etc.)

Examples not found
Count Integer Number of messages in the logs of a certain type.
function Count(MessageType: TMessageType): Integer;

MessageType - type of logs

History.Count(mtSystem)
MaxCount Integer Max number of messages in logs (change isnt recommended)
property MaxCount: Integer read fMaxCount write fMaxCount;
There are no arguments Examples not found
Clear - Deleting all messages.
procedure Clear(All: Boolean = True; MessageType: TMessageType = mtAll);
There are no arguments
History.Clear(False, mtSystem);  // deleting msg from system chat
SaveToFile - Saving logs from adrik to file.
procedure SaveToFile(Path: String; MessageType: TMessageType);
There are no arguments
History.SaveToFile(Script.Path+'logs.txt', mtSystem)

Objects

Name Class Description
History TMessages Messages list (logs)

Methods

Name Result Description
TBot.History TMessages