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/cytoid.py

33 lines
949 B
Python
Raw Normal View History

2022-08-17 08:21:59 +00:00
import discord
from bots.discord.client import client
from bots.discord.slash_parser import slash_parser
cytoid = client.create_group("cytoid", "查询Cytoid的相关信息")
@cytoid.command(description="查询Best30列表")
async def b30(ctx: discord.ApplicationContext):
await slash_parser(ctx, "b30")
@cytoid.command(description="查询Recent30列表")
async def r30(ctx: discord.ApplicationContext):
await slash_parser(ctx, "r30")
@cytoid.command(description="查询个人信息")
async def profile(ctx: discord.ApplicationContext):
await slash_parser(ctx, "profile")
@cytoid.command(description="绑定用户")
@discord.option(name="username", description="用户名")
async def bind(ctx: discord.ApplicationContext, username: str):
await slash_parser(ctx, f"bind {username}")
@cytoid.command(description="取消绑定用户")
async def unbind(ctx: discord.ApplicationContext):
await slash_parser(ctx, "unbind")