v1.1
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
from kurocore.utils.vk_utils import generate_random_id
|
||||
from kurocore.vk.utils import generate_random_id
|
||||
|
||||
|
||||
class ChatEvent:
|
||||
__slots__ = ('session', 'api', 'raw', 'type', 'member_id', 'text', 'photo')
|
||||
|
||||
def __init__(self, session, api, raw: dict):
|
||||
self.session = session
|
||||
def __init__(self, api, raw: dict):
|
||||
self.api = api
|
||||
self.raw: dict = raw
|
||||
|
||||
@@ -18,8 +17,7 @@ class ChatEvent:
|
||||
class Event:
|
||||
__slots__ = ('session', 'api', 'raw', 'type')
|
||||
|
||||
def __init__(self, session, api, raw: dict):
|
||||
self.session = session
|
||||
def __init__(self, api, raw: dict):
|
||||
self.api = api
|
||||
|
||||
self.raw: dict = raw['object']
|
||||
@@ -35,7 +33,7 @@ class Event:
|
||||
if text:
|
||||
data.update({'message': text})
|
||||
if attachments:
|
||||
if type(attachments) == str:
|
||||
if type(attachments) is str:
|
||||
data.update({'attachment': attachments})
|
||||
else:
|
||||
data.update({'attachment': ','.join(attachments)})
|
||||
|
||||
Reference in New Issue
Block a user