Archived
1
0
Fork 0

Update exchange_rate.py

This commit is contained in:
多羅狼 2023-12-19 11:55:09 +08:00 committed by GitHub
parent 5a1a7e2ef7
commit 51841a2e78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,8 @@ 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="base", description="The 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):
await slash_parser(ctx, f"{base} {target}")
await slash_parser(ctx, f"{amount}{base} {target}")