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

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", description="The amount of base currency.")
@discord.option(name="amount", default="1", 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):

View file

@ -3,13 +3,13 @@ import discord
from bots.discord.client import client
from bots.discord.slash_parser import slash_parser
wolframalpha = client.create_group("wolframalpha", "Use WolframAlpha.")
@wolframalpha.command(description="Input a question or formula to search for WolframAlpha.")
@client.slash_command(name="wolframalpha", description="Input a question or formula to search for WolframAlpha.")
@discord.option(name="query", description="Enter what you want to calculate.")
async def _(ctx: discord.ApplicationContext, query: str):
async def query(ctx: discord.ApplicationContext, query: str):
await slash_parser(ctx, query)
wolframalpha = client.create_group("wolframalpha", "Use WolframAlpha.")
@wolframalpha.command(description="Answer the question via WolframAlpha.")
@discord.option(name="question", description="Ask WolframAlpha.")