Fix when currency has comma

This commit is contained in:
yasirarism 2023-04-30 21:22:27 +07:00 committed by GitHub
parent 0c19e72428
commit 29f866eaf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,7 +28,7 @@ async def currency(self: Client, ctx: Message):
amount = teks[1]
currency_from = teks[2]
currency_to = teks[3]
if amount.isdigit():
if amount.isdigit() or amount.isdecimal():
url = f"https://v6.exchangerate-api.com/v6/{CURRENCY_API}/" f"pair/{currency_from}/{currency_to}/{amount}"
try:
res = await http.get(url)