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/bots/discord/slash/github.py
2022-08-30 20:49:01 +08:00

20 lines
591 B
Python

import discord
from bots.discord.client import client
from bots.discord.slash_parser import slash_parser
github = client.create_group("github", "查询Github的相关信息")
@github.command()
@discord.option(name="username_or_repo", description="用户名或仓库名")
async def get(ctx: discord.ApplicationContext, username_or_repo: str):
await slash_parser(ctx, username_or_repo)
@github.command()
@discord.option(name="keyword", description="搜索关键词")
async def search(ctx: discord.ApplicationContext, keyword: str):
await slash_parser(ctx, f'search {keyword}')