Skip to main content

Handler Events

To track events, we will need either methods or parameters in the loader.

Available events

  • readyCommand
  • messageCommand
  • callbackQueryCommand
  • editedMessageCommand
  • channelPostCommand
  • editedChannelPostCommand
  • inlineQueryCommand
  • shippingQueryCommand
  • preCheckoutQueryCommand
  • pollCommand
  • messageReactionCommand
  • messageReactionCountCommand
  • chatBoostCommand
  • removedChatBoostCommand
  • pollAnswerCommand
  • functionErrorCommand
  • chatMemberCommand
  • myChatMemberCommand
  • chatJoinRequestCommand
  • variableDelete -- functions: $oldVariable[table/variable/data]
  • variableUpdate -- functions: $variable[table/variable/newData/oldData]
  • variableCreate -- functions: $newVariable[table/variable/data]

Available events in the loader

  • ready
  • message
  • callback_query
  • edited_message
  • message_reaction
  • message_reaction_count
  • channel_post
  • edited_channel_post
  • inline_query
  • shipping_query
  • pre_checkout_query
  • poll
  • poll_answer
  • chat_member
  • my_chat_member
  • chat_join_request
  • functionError
  • removed_chat_boost
  • chat_boost
  • variableDelete
  • variableUpdate
  • variableCreate

Example

You can implement event handlers in your Telegram bot using methods or by specifying event parameters in the loader.

<AoiClient>.readyCommand({
code: `$print[Starting @$client[username]]`,
});