Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/github/__init__.py
2023-12-18 20:15:53 +08:00

28 lines
746 B
Python

from core.builtins import Bot
from core.component import module
from modules.github import repo, user, search
github = module('github', alias='gh', developers=['Dianliang233'], desc='{github.help.desc}')
@github.command('<name> {{github.help}}')
async def _(msg: Bot.MessageSession, name: str):
if '/' in name:
await repo.repo(msg)
else:
await user.user(msg)
@github.command('repo <name> {{github.help.repo}}')
async def _(msg: Bot.MessageSession):
await repo.repo(msg)
@github.command('user <name> {{github.help.user}}')
async def _(msg: Bot.MessageSession):
await user.user(msg)
@github.command('search <query> {{github.help.search}}')
async def _(msg: Bot.MessageSession):
await search.search(msg)