AoiTelegram@0.7.0
Added
- Added the method
<AoiClient>.hasFunction, which allows checking if a function exists in the library. - Added the method
<AoiClient>.ensureFunction, which allows manually overwriting or modifying functions. - Introduced a new way of creating functions called
callback. These functions have a different syntax compared to custom functions. Callback functions do not overwrite core functions and have a set of functions for interaction.
Changed
- Most variables in the classes provided by
aoitelegramare no longer private from the perspective oftypescript(Command,Action,Awaited,Timeout). - Changed the type
unknownto a generic type in the method<CustomEvent>.emit. - Now
actionandcommandcan be tracked by multiple handlers, not just one. - Attempting to set a new handler for
timeout/loopcommands will now result in an error. - The method
<AoiClient>.addFunctionno longer allows overwriting functions as it did before. Also,<AoiClient>.editFunctioncannot add a function. These functions now adhere to their original purpose. - Renamed
<AoiClient>.commandto<AoiClient>.addCommand, and<AoiClient>.actionto<AoiClient>.addAction. - The library will no longer assign functions to global classes (e.g.,
Stringand methods likereplaceLastandafter). - To reduce file size, the library will use
UglifyJSonly for internal folders where functions are stored. - Completely revised comments in the source code to adhere to
typedoc, instead of the previous mixture oftypedocandjsdoc.
Fixed
AoiTelegram Functions
Changed
- The function
$pingnow accepts the parametertype(client- bot ping,db- database ping).
Fixed
- The function
$jsEval.
Added
- Added a new operator
!to prevent all errors inundefined(syntax:$!functionName). - Added functions
$continueand$indexforloop/awaitedcommands. - The function
$argumentsCountis now available for custom functions with theaoitelegramsyntax. - Added functions:
$stopTimeout,$hasTables,$tablesCount,$variablesCount,$packageDependencies,$charCount,$cropText,$reverse,$toLocaleUpperCase,$bufferAlloc,$bufferCreate,$bufferLength,$bufferToString,$matchRegex,$testRegex,$abs,$ceil,$advancedTextSplit,$callback,$error,$parseTime,$readyTimestamp,$uri,$maxRam,$and,$findSpecialChars,$or,$index,$continue,$executionTime,$argumentsCount,$arguments,$maxSafeInteger,$isNegative,$isPositive,$callFunction,$randomUUID,$bufferAllocUnsafe.