[1.8-1.17.1] VK-API | Library for creating VK-support plugins | Spigot-Bungee

Gdafag

New Member
Member
Joined
Mar 23, 2021
Messages
2
THIS PLUGIN FOR CREATING CHAT BOTS IN VK.COM

ВИКИ

46r2baf00uhoixq-saia7wegqfu.jpeg

Welcome to the VK-API resource
  • Install
    • Installing the plugin is a very important step. And when installing and configuring the plugin, there may be wrong unexpected errors. We recommend using the installation instructions. You can read the instructions at the link.
  • How to use library (For DEVS)
    • Instructions for using the API for developers can be found here.
  • FAQ
    • Read the FAQ you can read here.
Attention! Some events may not work if you did not check the boxes in the right places in the Long Pool API for the bot
At the moment there are 43 events, you can also watch them in VK:

  • VKJsonEvent
    • Call condition: All enabled events in the Long Pool API settings of the bot.
    • Attention! The event calls even missing events, but in Json format. I advise you to use Gson to get objects with JSON
  • VKMessageEvent
    • Call condition: When a message is received in the private messages of a group, or in a conversation in which the bot is located
    • To send a response to the same place where the message came from, I advise you to use peerId

Java:
public void onVKMessage(VKMessageEvent e) {
       Integer peerId = e.getMessage().getPeerId();
}

  • VKMessageTypingEvent
    • Call condition: When someone types a message to the bot (Conversations do not work)
  • VKCallbackButtonPressEvent
    • Call condition: When you press the Callback button in the keyboard
    • The event does not fire on regular buttons, but only on callback buttons
    • First, create a keyboard button and set KeyBoardButtonAction (). through setLabel changes the text on the button. setType sets the type of the button to callback. setPayload is needed in order for the button to store information (which is not visible in the button)
Java:
 new KeyboardButton().setAction(new KeyboardButtonAction().setLabel("Текст на кнопке").setType(TemplateActionTypeNames.CALLBACK).setPayload("вашPayload"));

  • VKAudioNewEvent
    • Call condition: When someone in the community adds an audio recording
  • VKBoardDeleteEvent
    • Call condition: Delete comment in discussions
  • VKBoardEditEvent
    • Call condition: Editing comment in discussions
  • VKBoardNewEvent
    • Call condition: Create comment in discussions
  • VKBoardRestoreEvent
    • Call condition: Restore comment in discussions
  • VKGroupChangePhotoEvent
    • Call condition: When changing the group photo
  • VKGroupChangeSettingsEvent
    • Call condition: When the settings in the group are changed
  • VKGroupOfficersEdit
    • Call condition: When the list of managers has changed
  • VKLikeAddEvent
    • Call condition: When someone liked the post / photo / video in the group
  • VKLikeRemoveEvent
    • Call condition: When someone removed the like from a post / photo / video in a group
  • VKMarketCommentDeleteEvent
    • Call condition: When someone deletes a comment under the market
  • VKMarketCommentEditEvent
    • Call condition: When someone edits a comment under the market
  • VKMarketCommentRestoreEvent
    • Call condition: When someone restored the comment under the market
  • VKMessageAllowEvent
    • Call condition: When someone allowed to send a message to the community
  • VKMessageDenyEvent
    • Call condition: When someone forbids sending a message to the community
  • VKMessageEditEvent
    • Call condition: Editing a message in private messages (Does not work in a conversation!)
  • VKMessageReplyEvent
    • Call condition: When a bot wrote a message
  • VKPhotoCommentDeleteEvent
    • Call condition: When someone remove comment on the photo
  • VKPhotoCommentEditEvent
    • Call condition: When someone edited the comment under the photo
  • VKPhotoCommentRestoreEvent
    • Call condition: When someone restored the comment under the photo
  • VKPhotoNewEvent
    • Call condition: When a photo was posted in the group (Not in comments, but in albums)
  • VKPollVoteNewEvent
    • Call condition: When someone voted in a public poll
  • VKPostNewEvent
    • Call condition: When a post appeared on the group wall
  • VKPostReplyEditEvent
    • Call condition: When editing a post in a group
  • VKPostReplyEvent
    • Call condition: When adding a comment in a group post
  • VKPostReplyRestoreEvent
    • Call condition: When restoring a comment in a group post
  • VKPostRepostEvent
    • Call condition: When someone repost the post
  • VKUserBlockEvent
    • Call condition: When a user is blocked in a group
  • VKUserUnblockEvent
    • Call condition: When a user is unliked in a group
  • VKUserGroupLeaveEvent
    • Call condition: When the user leaves the community
  • VKUserGroupJoinEvent
    • Call condition: When the user joins the community
  • VKVideoCommentDeleteEvent
    • Call condition: When deleting a comment under the video
  • VKVideoCommentEditEvent
    • Call condition: When editing a comment under a video
  • VKVideoCommentEvent
    • Call condition: When commenting under the video
  • VKVideoCommentRestoreEvent
    • Call condition: When restoring the comment under the video
  • VKVideoNewEvent
    • Call condition: When a video appears in a video album in a group
Currently missing events: VKMarketOrderNewEvent, VKMarketOrderEditEvent, and events related to VKPAY and VK Donut
Установка
  • First, you must download the plugin. And move it to the plugins folder. Start the server and wait until the VK-API folder appears inside plugins.

  • After generating the VK-API folder, disconnect the server. And set up the VK group. Tutorial.
    • Do not ignore the tutorial, there you can learn how to get a VK-token, how to disable / enable certain events from the bot.
  • If you already have a token-key and group ID, paste it into config.yml which is located in the generated folder

    68747470733a2f2f692e6962622e636f2f3132504b6e474a2f696d6167652e706e67
    • If you have an alphabetic ID, use this site to convert to a regular ID
  • Congratulations, you've installed the VK-API plugin!

If you find bugs, write to me in VK, or in Discussions!

My VK: vk.com/bbaty45

Used library: https://github.com/VKCOM/vk-java-sdk
 
BlackSpigot General Chat
Rules Help Users
    L @ l kjhgfedrwsqa: fuck u
    Top