diff options
author | Kyomotoi <[email protected]> | 2020-05-05 15:12:35 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-05-05 15:12:35 +0800 |
commit | 76bc38277716348f4ecc5d8adbc199d40d9c1064 (patch) | |
tree | e201a8fd4440b7875f7275bb755332f23b2e4604 /AyaBot/plugins/awsl.py | |
parent | 5487ad601dea57c34d8721e4373db57df2fe6f17 (diff) | |
download | ATRI-76bc38277716348f4ecc5d8adbc199d40d9c1064.tar.gz ATRI-76bc38277716348f4ecc5d8adbc199d40d9c1064.tar.bz2 ATRI-76bc38277716348f4ecc5d8adbc199d40d9c1064.zip |
做了些小改动
以话慢慢补全功能 目前能用的
只有other
Diffstat (limited to 'AyaBot/plugins/awsl.py')
-rw-r--r-- | AyaBot/plugins/awsl.py | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/AyaBot/plugins/awsl.py b/AyaBot/plugins/awsl.py deleted file mode 100644 index d2f976a..0000000 --- a/AyaBot/plugins/awsl.py +++ /dev/null @@ -1,63 +0,0 @@ -import os -import random -from nonebot import on_command, CommandSession, permission as perm, on_request -from datetime import datetime -from typing import Optional - -import pytz -from pandas import Timestamp - - -CST_TIMEZONE = 'Asia/Shanghai' - - -def beijing_now(freq: Optional[str] = None) -> datetime: - now = datetime.now(pytz.timezone(CST_TIMEZONE)) - if freq is not None: - now = Timestamp(now).round(freq) - return now - - -def beijing_from_timestamp(timestamp: int) -> datetime: - return datetime.fromtimestamp(timestamp, pytz.timezone(CST_TIMEZONE)) - - -@on_command('阿这', only_to_me=False) -async def _(session: CommandSession): - await session.send('阿这') - -@on_command('喵', aliases=['喵喵', '喵喵喵'], only_to_me=False) -async def _(session: CommandSession): - await session.send('喵~') - -@on_command('奶宝', aliases=['@๑ ^ ₃•๑', '奶够翘'], only_to_me=False) -async def _(session: CommandSession): - await session.send('别叫了别叫了,8在') - -@on_command('抽签', only_to_me=False) -async def _(session: CommandSession): - await session.send(str(random.choice(['大凶', '小凶', '凶', '吉', '小吉', '中吉', '大吉']))) - -@on_command('掷骰子', aliases=['投骰子'], only_to_me=False) -async def _(session: CommandSession): - await session.send(str(random.randint(1,6))) - -@on_command('?', aliases=['?', '❓'], only_to_me=False) -async def _(session: CommandSession): - await session.send('?') - -@on_command('seach_this_group_p', aliases=['本群总人数', '总人数', '群人数'], only_to_me=False, permission=perm.GROUP) -async def _(session: CommandSession): - try: - seach_group_member = await session.bot.get_group_member_list( - group_id=session.ctx['group_id'] - ) - except: - await session.send('获取数据时出问题,请重试') - return - - await session.send(f'本群目前共有{len(seach_group_member)}人') - - - -
\ No newline at end of file |