-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.py
More file actions
31 lines (23 loc) · 775 Bytes
/
command.py
File metadata and controls
31 lines (23 loc) · 775 Bytes
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
from functions import on_fullmatch, on_startswith
import message
import random
from datetime import date
@on_startswith('nya')
async def func1():
await message.send('hello')
@on_fullmatch('/')
async def func2():
with open(r'C:\Users\DELL\Desktop\00000\123456.txt', 'w') as f:
f.write('cool')
@on_fullmatch('/today')
async def _():
rnd = random.Random()
rnd.seed(int(date.today().strftime("%y%m%d")) + int(message.Event.user_id))
lucknum = rnd.randint(0, 100)
msg = f'您今日的幸运指数是{lucknum}'
await message.send(msg)
@on_fullmatch('/reply')
async def reply():
# await var.MessageSegment.at(content='123')
await message.MessageSegment.at('nyaaaaa', pic=r'.\000.jpg')
await message.MessageSegment.at('nyaa', True)