-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathresource.py
47 lines (34 loc) · 931 Bytes
/
resource.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from __future__ import annotations
from avilla.core.resource import Resource
from avilla.core.selector import Selector
class OneBot11Resource(Resource[bytes]):
file: str
url: str
def __init__(self, selector: Selector, file: str, url: str):
super().__init__(selector)
self.file = file
self.url = url
class OneBot11ImageResource(OneBot11Resource):
pass
class OneBot11RecordResource(OneBot11Resource):
pass
class OneBot11VideoResource(OneBot11Resource):
pass
class OneBot11FileResource(OneBot11Resource):
name: str
path: str
size: int
busid: int | None
def __init__(
self,
selector: Selector,
name: str,
path: str,
size: int,
busid: int | None = None
):
super().__init__(selector, "", "")
self.name = name
self.path = path
self.size = size
self.busid = busid