Skip to main content

AoiTelegram@0.4.0

Added

  • Partial support for Telegram API 7.0 added.
  • functionError event added to the command loader.
  • CustomEvent class introduced for creating custom events based on EventEmitter.
  • <LoadCommands>.loadVariables method added to load variables from a folder.
  • Added chat/user ID verification (partial implementation).
  • Added support for suppressErrors ($suppressErrors) in case of code errors (If set to true in options for sendMessageError and functionError, suppressErrors will override them).

Fixes

  • Typing of parameters in the <AoiClient>.addFunction method and internal library classes corrected.
  • Support for @aoitelegram/database fixed; code for Timeout was dependent on database-sempai, which was not initially addressed, and support for the new DB should be present.
  • Fixed sendMessageError option in the AoiClient class constructor.
  • <Context>.getAoiArgs method incorrectly returned the inside parameter.
  • Parsing of objects in the <Context>.evaluateArgs method fixed.

Updated

  • Comments for the source code have been refined.
  • Removed the use of async/await for methods in the @aoitelegram/database library (the library uses synchronous functions).
  • Parameter line is no longer required wherever needed in the MessageError class.
  • Error messages are now more user-friendly, and the text of errors in <Context>.checkArgumentTypes has been reduced.
  • Changed the function loading from the library. Previously, functions were loaded when using commands/events, which took some time. Now, all functions will be loaded at the bot's start, significantly speeding up code execution when using commands/events.

AoiTelegram Function

  • Numerous functions fixed, and several functions added. Only $toString and $availableParallelism were removed.
  • Readability improved for external functions.