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/bug.py
2022-08-17 20:20:01 +08:00

15 lines
518 B
Python

import discord
from bots.discord.client import client
from bots.discord.slash_parser import slash_parser
async def auto_search(ctx: discord.AutocompleteContext):
if ctx.options["mojiraid"] == '':
return ['MC-', 'MCPE-', 'MCD-', 'MCL-', 'REALMS-', 'WEB-', 'MCCE-']
@client.command(description="查询一个已记录在Mojira上的bug信息")
@discord.option(name="mojiraid", autocomplete=auto_search)
async def bug(ctx: discord.ApplicationContext, mojiraid: str):
await slash_parser(ctx, mojiraid)