Çözüldü Discord ile sunucuya kayıt olma

  • Konuyu Başlatan Konuyu Başlatan BartuAbiHD
  • Başlangıç tarihi Başlangıç tarihi
  • Görüntüleme 516

BartuAbiHD

Bir Kömür Göründü Kaptanım!
Yasaklandı
Katılım
3 Temmuz 2014
Mesajlar
105
Elmaslar
38
Puan
13.445
Minecraft
BartuAbiHD

Discord:

BAHD

Merhaba, minecraft sunucuma girince ekranda kod çıkıyor ve Discord'taki belirli sohbet kanalına o kodu girince onaylanmasını istiyorum.
Fakat sunucuya girmeye çalışınca bir kere kod verdikten sonra tekrar deneyince kodu Discord'a yazmadığım halde sunucuya girilebiliyor.
Bunun sebebi, kod verdiğinde beni direkt kayıt ediyor.

Nasıl çözebilirim?

Kod:
options:
    token: "DISCORD BOT TOKENI"
    botName: "BOTUNADI"
    channelID: "KAYIT KANAL ID"

on load:
    if {@botName} parsed as bot is not set:
        login to {@token} with name {@botName}
    set status of {@botName} to online
    if {joinstartevent} isn't set:
        set {joinstartevent} to 0

on unload:
    set status of {@botName} to do not disturb
    logout {@botName}

on join:
    if {dogrulamaSistemi::oyuncular::%player%::dcID} isn't set:
        if {dogrulamaSistemi::oyuncular::%player%::kodAldı} isn't set:
            if {joinstartevent} < 50:
                set {_code} to random string matching "[A-Za-z0-9]{8}" #Rastgele bir kod olustur
                set {dogrulamaSistemi::oyuncular::%player%::kodAldı} to {_code} #Olusturulan kod ile oyuncuyu kayit et
                execute console command "minecraft:kick %player% &eSunucumuza giriş yapmanız icin discord sunucumuzdan &a&n##beta-kayıt&e kanalına &b%{_code}% &ekodunu girmeniz gerekecektir."
                set {joinstartevent} to {joinstartevent} + 1
            else:
                send "&eDiscord eşleme betadan kaldırıldı!" to player
on first join:
    if {dogrulamaSistemi::oyuncular::%player%::dcID} isn't set:
        if {dogrulamaSistemi::oyuncular::%player%::kodAldı} isn't set:
            if {joinstartevent} < 50:
                set {_code} to random string matching "[A-Za-z0-9]{8}" #Rastgele bir kod olustur
                set {dogrulamaSistemi::oyuncular::%player%::kodAldı} to {_code} #Olusturulan kod ile oyuncuyu kayit et
                execute console command "minecraft:kick %player% &eSunucumuza giriş yapmanız icin discord sunucumuzdan &a&n##beta-kayıt&e kanalına &b%{_code}% &ekodunu girmeniz gerekecektir."
                set {joinstartevent} to {joinstartevent} + 1
            else:
                send "&eDiscord eşleme betadan kaldırıldı!" to player

on server message received seen by {@botName}:
    if discord id of event-channel is {@channelID}:
        delete event-message
        if {dogrulamaSistemi::kodlar::%event-message%} is set:
            set {dogrulamaSistemi::oyuncular::%{dogrulamaSistemi::kodlar::%event-message%}%::dcID} to discord id of event-user
            send "Hesabın doğrulandı %mention tag of event-user%! Oyundaki ismin: **%{dogrulamaSistemi::kodlar::%event-message%}%**" to event-channel with {@botName}
            send "Hesabın ""@%mention tag of event-user%"" ile bağlandı." to {dogrulamaSistemi::kodlar::%event-message%}
            delete {dogrulamaSistemi::kodlar::%event-message%}
            delete {dogrulamaSistemi::oyuncular::%{dogrulamaSistemi::kodlar::%event-message%}%::kodAldı}

İstediğim şey bu kodu Discord'ta belirtilen kanala yazdıktan sonra sunucuya giriş yapabilmek.
1653580923620.png
 
Son düzenleme:
Kod:
on quit:
    delete {dogrulamaSistemi::oyuncular::%player%::kodAldı}

Dener misin?
 
Kod:
on quit:
    delete {dogrulamaSistemi::oyuncular::%player%::kodAldı}

Dener misin?
Çok saçma bir kod bu, kayıt olunamıyor sunucudan her çıkış yapıldığında kayıt silindiği için.
 
Skript yerine plugin kullanabilirsiniz.
 
Son düzenleme:

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst