AoiTelegram@0.6.0
Added
- Added support for
mongodb
. - Added option
<AoiClient>.options.disableAoiDB
- for disabling internal databases. - Added method
<AoiClient>.editFunction(options: DataFunction | DataFunction[])
- for editing functions. - Added method
<AoiClient>.getFunction(options: string | string[])
- for retrieving functions. - Added method
<AoiClient>.countFunction
- for getting the count of available functions (both library and custom functions).
Updated
- Completely redesigned the event system for the database.
aoitelegram
now requires Node.js version 16 and above.- Renamed the parameter in the
AoiClient
class fromoptions.console
tooptions.logging
. - Completely refactored the
AoiWarning
class, introducing optionsenableBeta
andenableDev
for enabling beta and dev installations. Also, modified console output. The process now stops after updates instead of restarting, addressing previous bugs. - Error handling has been completely reworked. This change was necessary because the Telegram API does not provide methods for various checks. As a result, the code mechanism now handles errors related to the Telegram API, displaying them as regular errors with arguments, unlike before when we manually checked for existing users, etc. (in simple terms, API errors will be displayed in the chat).
- Now, instead of arrays for storage, the
Collection
class is used to manage functions more conveniently and improve code readability. - Updated text when enabling the bot.
Fixes
- Fixed typing in
<AoiClient>.addFunction
. - Fixed updated context property types for functions.
- Fixed parsing type
object
.
Deleted
- Removed unnecessary dependencies (
parsejson
).