-
-
Notifications
You must be signed in to change notification settings - Fork 2
Ethosa edited this page Feb 19, 2022
·
10 revisions
The main module in Shizuka.
Via Login and password
:
var vk = newVk(89123456789, "your password")
Via access_token
:
var vk = newVk(access_token="your access token here")
var vk = newVk("your access token here", 123456789)
var response = await vk.callVkMethod("users.get", %*{"user_ids": "akihayase"})
With ~
macro
var response = await vk~users.get(user_ids="akihayase")
var
vk = newVk(...)
lp = vk.newLongpoll()
for event in lp.listen():
if event["type"].getStr == "message_new":
echo event
With @
macro
var
vk = newVk(...)
lp = vk.newLongpoll()
vk@message_new(event):
echo event
lp.run()
Closes events handler:
lp.close()