Module: VkLongpollBot::Events
- Defined in:
- lib/vk_longpoll_bot/events.rb
Overview
Everything related to longpoll events.
Defined Under Namespace
Classes: Event, EventListener
Constant Summary collapse
- TYPES =
All the types and subtypes of events.
{ message: %w{message_new message_reply message_edit message_typing_state message_allow message_deny}, photo: %w{photo_new photo_comment_new photo_comment_edit photo_comment_restore photo_comment_delete}, audio: %w{audio_new}, video: %w{video_new video_comment_new video_comment_edit video_comment_restore video_comment_delete}, wall: %w{wall_post_new wall_repost wall_reply_new wall_reply_edit wall_reply_restore wall_reply_delete}, board: %w{board_post_new board_post_edit board_post_restore board_post_delete}, market: %w{market_comment_new market_comment_edit market_comment_restore market_comment_delete}, group: %w{group_leave group_join group_officers_edit group_change_settings group_change_photo}, user: %w{user_block user_unblock}, poll: %w{poll_vote_new}, vkpay: %w{vkpay_transaction}, app: %w{app_payload} }
Class Method Summary collapse
-
.valid_subtype?(subtype) ⇒ Boolean
Check whether subtype is correct.
Class Method Details
.valid_subtype?(subtype) ⇒ Boolean
Check whether subtype is correct.
28 29 30 |
# File 'lib/vk_longpoll_bot/events.rb', line 28 def self.valid_subtype?(subtype) TYPES.values.any? { |arr| arr.include?(subtype) } end |