Discord.js Modül pokemon.js -NEW- :)

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
const keytr = require('keytr.js');
Banlı Üye
Katılım
15 Ağu 2018
Mesajlar
542
Tepki puanı
138
Yaş
26
7 HİZMET YILI
:yazı:

Selamın aleykım okuldan gelip ilk işim sizlerin hatrınızı soralım nasılsınız iyimisiniz umarım iyisinizdir neyse konumuza gelelim öncelikle pokemon.js diye dosya açiyoruz ve yeni metin belgesi yani farklı kaydet yapiyoruz sonra kodumuzu yapiştiriyoruz!

JavaScript:
const Discord = require('discord.js')
const Pokedex = require('pokedex-api')
const pokedex = new Pokedex()
 
exports.run = async (client, message, args) => {
        if (!args[0]) {
                const embed = new Discord.RichEmbed()
                        .setDescription(`Lütfen geçerli bir Pokemon ismi veya Pokemon ID numarası yazın.`)
                        .setTimestamp()
                        .setColor("RANDOM")
                message.channel.send({embed})
                return
        }
      
        try {
                const pokeponum = args.join(" ")
                const pokemon = await pokedex.getPokemonByName(encodeURIComponent(pokeponum));
                const pokepon = pokemon[0]
                const embed = new Discord.RichEmbed()
                        .setAuthor(`${pokepon.name} | Pokemon Bilgileri`, `https://i.imgur.com/5NO19vd.png`)
                        .addField(`Pokédex Numarası`, pokepon.number)
                        .addField(`Tür`, pokepon.species)
                        .addField(`Tip`, pokepon.types.join(', '))
                        .addField(`Normal Yetenekler`, pokepon.abilities.normal.join(', ') || 'Bulunmuyor/Bilinmiyor')
                        .addField(`Gizli Yetenekler`, pokepon.abilities.hidden.join(', ') || 'Bulunmuyor/Bilinmiyor')
                        .addField(`Yumurta Grubu`, pokepon.eggGroups.join(', '))
                        .addField(`Cinsiyet`, pokepon.gender.length ? `Erkek: ${pokepon.gender[0]}% | Kadın: ${pokepon.gender[1]}%` : 'Bilinmiyor')
                        .addField(`Boy`, pokepon.height)
                        .addField(`Ağırlık`, pokepon.weight)
                        .setThumbnail(pokepon.sprite)
                        .setColor("RANDOM")
                        .setTimestamp()
                message.channel.send({embed})
        } catch (err) {
                const embed = new Discord.RichEmbed()
                        .setDescription(`Lütfen geçerli bir Pokemon ismi veya Pokemon ID numarası yazın.`)
                        .setColor("RANDOM")
                        .setTimestamp()
                message.channel.send({embed})
        }
}
 
exports.conf = {
        enabled: true,
        guildOnly: false,
        aliases: ['pokedex'],
        permLevel: 0
}
 
exports.help = {
        name: 'pokemon',
        description: 'Belirtilen Pokemon hakkında bilgi verir.',
        usage: 'pokemon [pokemon ismi/pokemon id numarası]'
}


:not:

b0970076f1aaac08d24cc534a8afbf18.svg
Ek modül: pokedex-api
b0970076f1aaac08d24cc534a8afbf18.svg
komutlar/pokemon.js olarak yapınız.
 
  • Konuyu başlatan
  • Yasaklandı
  • #5
const keytr = require('keytr.js');
Banlı Üye
Katılım
15 Ağu 2018
Mesajlar
542
Tepki puanı
138
Yaş
26
7 HİZMET YILI
Discord Dışı Şeylerde var Onlara Yönel Mesela ts,vb Kendini Geliştir amacında Söylüyom ;)

hepsi var merak etme dostum discord.js botunu kodliyabilirsen sende kodla benim işim bu bunu paylaşiyorum :)
 
Ultra Üye
Katılım
23 Ağu 2018
Mesajlar
1,502
Çözümler
5
Tepki puanı
174
Ödüller
10
7 HİZMET YILI
Ooo Teşekkürler Hocam.
Yararlı+++

Şu ByPass Kodunu Bi Vermedin gitti :D
 
Herkesin menfaatince kankisin bu hayatta.
Süper Üye
Katılım
22 Ara 2017
Mesajlar
1,461
Çözümler
1
Tepki puanı
542
8 HİZMET YILI
helal sana heme ekliyorum meraklandın vallahi bakalım nasıl olucak ts3 bekliyoruz
 
Uzman Üye
Katılım
24 Mar 2018
Mesajlar
151
Tepki puanı
16
Ödüller
3
8 HİZMET YILI
C:\Users\wn8\Desktop\bot\bot.js:22
log(`Yüklenen komut: ${props.help.name}.`);
^

TypeError: Cannot read property 'name' of undefined
at files.forEach.f (C:\Users\wn8\Desktop\bot\bot.js:22:39)
at Array.forEach (<anonymous>)
at fs.readdir (C:\Users\wn8\Desktop\bot\bot.js:20:9)
at FSReqWrap.oncomplete (fs.js:141:20)

bu hatayı alıyorum çözemedimde neden oldu anlamadım
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst