F
Furkan Doğan
Ziyaretçi
?GEREKEN EKLENTİLER
?KOMUTLAR
!covid, !corona, !korona, !virüs, !koronavirüs
?GÖRSELLER
?KURULUM
➔ Bir Discord Botu Oluşturun.
➔ Yukarıda Belirtilen Eklentileri Sunucunuza Kurun.
➔ Aşağıda Verilen Kodu Sunucunuza Atın.
➔ Koddaki Doldurmanız Gereken Yerleri Doldurun.
➔ Sunucunuzu Aktif Edin.
?KOD
Değerli ziyaretçimiz, içeriği görebilmek için
şimdi giriş yapın veya kayıt olun.
Değerli ziyaretçimiz, içeriği görebilmek için
şimdi giriş yapın veya kayıt olun.
Değerli ziyaretçimiz, içeriği görebilmek için
şimdi giriş yapın veya kayıt olun.
?KOMUTLAR
!covid, !corona, !korona, !virüs, !koronavirüs
?GÖRSELLER
➔ Bir Discord Botu Oluşturun.
➔ Yukarıda Belirtilen Eklentileri Sunucunuza Kurun.
➔ Aşağıda Verilen Kodu Sunucunuza Atın.
➔ Koddaki Doldurmanız Gereken Yerleri Doldurun.
➔ Sunucunuzu Aktif Edin.
?KOD
Kod:
options:
Prefix: !
Token: "Buraya Yapıştırın"
Bot: "Buraya Yapıştırın"
on load:
login to {@Token} with name {@Bot}
on unload:
logout {@Bot}
discord command covid:
prefixes: {@Prefix}
aliases: corona, korona, virüs, koronavirüs
trigger:
purge the event-message with {@Bot}
covidApi("%discord id of event-channel%", "%event-member%")
function covidApi(channel: text, user: text):
send a "GET" request to "https://api.apify.com/v2/key-value-stores/28ljlt47S5XEd1qIi/records/LATEST?disableRedirect=true"
set {_response} to last http response
set {_body} to {_response}'s body
set {_covid::*} to {_body} split at nl
replace all """" and "," and "dailyTested" and "dailyInfected" and "dailyDeceased" and "dailyRecovered" and "lastUpdatedAtSource" and "T00:00:00.000Z" and ":" with "" in {_covid::*}
create embed:
set title of embed to title with text "Türkiye Günlük COVID-19 Verileri"
set description of embed to ":alarm_clock: **Veri Tarihi;**%nl%%{_covid::14}%%nl%%nl%:test_tube: **Test Sayısı;**%nl%%{_covid::8}%%nl%%nl%:microbe: **Vaka Sayısı;**%nl%%{_covid::9}%%nl%%nl%:headstone: **Vefat Sayısı;**%nl%%{_covid::10}%%nl%%nl%:pill: **İyileşen Sayısı;**%nl%%{_covid::11}%%nl%%nl%"
set color of the embed to color from rgb 140, 176, 116
set the thumbnail of embed to "https://i.hizliresim.com/p5ng78l.png"
set the footer of embed to footer with text "%{_user}% Tarafından İstendi." and no icon
set the timestamp of embed to now
send last created embed to channel with ID "%{_channel}%" with {@Bot}