Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-12-18 19:58:18 +08:00 committed by GitHub
parent a96ea5993d
commit 2d36d67619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -4,6 +4,11 @@ from bots.discord.client import client
from bots.discord.slash_parser import slash_parser
from core.utils.i18n import get_available_locales
@client.slash_command(description="View details of a module.")
@discord.option(name="module", default="", description="The module you want to know about.")
async def help(ctx: discord.ApplicationContext, module: str):
await slash_parser(ctx, module)
@client.slash_command(description="Set the bot running languages.")
@discord.option(name="lang", choices=get_available_locales(), default="", description="Supported language codes.")
@ -21,6 +26,11 @@ async def ping(ctx: discord.ApplicationContext):
await slash_parser(ctx, "")
@client.slash_command(description="Get the number of petals in the current channel.")
async def petal(ctx: discord.ApplicationContext):
await slash_parser(ctx, "")
@client.slash_command(description="View bot version.")
async def version(ctx: discord.ApplicationContext):
await slash_parser(ctx, "")

View file

@ -4,7 +4,7 @@ from bots.discord.client import client
from bots.discord.slash_parser import slash_parser
@client.slash_command(description="Convert currency prices according to the exchange rate of the day.")
@discord.option(name="amount", default=1.0, description="The amount of base currency.")
@discord.option(name="amount", description="The amount of base currency.")
@discord.option(name="base", description="The base currency unit.")
@discord.option(name="target", description="The target currency unit.")
async def exchange_rate(ctx: discord.ApplicationContext, amount: float, base: str, target: str):