upd
This commit is contained in:
parent
2d36d67619
commit
1d79c2360a
2 changed files with 5 additions and 5 deletions
|
@ -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):
|
||||
|
|
|
@ -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.")
|
||||
|
|
Reference in a new issue