This commit is contained in:
Yasir Aris M 2024-09-27 12:53:49 +07:00 committed by GitHub
parent 860f5878b9
commit 661b21e9e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -280,7 +280,7 @@ async def tebak_lontong(client, message):
async def tebak_kata(client, message): async def tebak_kata(client, message):
getdata = await fetch.get("https://yasirapi.eu.org/tebakkata") getdata = await fetch.get("https://yasirapi.eu.org/tebakkata")
if getdata.status_code != 200: if getdata.status_code != 200:
return await message.reply_msg("Gagal Mendapatkan data tebak lontong.") return await message.reply_msg("Gagal Mendapatkan data tebak kata.")
result = getdata.json() result = getdata.json()
soal = result['soal'] soal = result['soal']
correct_answer = result['jawaban'] correct_answer = result['jawaban']
@ -301,7 +301,7 @@ async def tebak_kata(client, message):
async def tebaktebakan(client, message): async def tebaktebakan(client, message):
getdata = await fetch.get("https://yasirapi.eu.org/tebaktebakan") getdata = await fetch.get("https://yasirapi.eu.org/tebaktebakan")
if getdata.status_code != 200: if getdata.status_code != 200:
return await message.reply_msg("Gagal Mendapatkan data tebak lontong.") return await message.reply_msg("Gagal Mendapatkan data tebak tebakan.")
result = getdata.json() result = getdata.json()
soal = result['soal'] soal = result['soal']
correct_answer = result['jawaban'] correct_answer = result['jawaban']