We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kayn.DDragon.Item .list() .version(config.riot_api_version) .callback((error, list) => { if (error) { console.error(error); return message.reply('sorry an api error occurred, please try again.'); }
const items = list.data; const item = Object.entries(items).find(weapon => weapon.name.toLowerCase() === itemName); if (!item) { return message.reply('sorry no such item exists, please try again.'); } const embed = new Discord.RichEmbed() .setTitle(item.name) .setDescription(item.description.replace(/\s*\<.*?\>\s*/g, '')) .setThumbnail(`http://ddragon.leagueoflegends.com/cdn/${config.riot_api_version}/img/item/${item.image.full}`) .addField(`${item.plaintext} into ${item.into.join('/')}`) .addField('Purchase Price', item.gold.total, true) .addField('Sell Price', item.gold.sell, true); message.channel.reply(embed); });`
{ statusCode: undefined, url: 'https://ddragon.leagueoflegends.com/cdn/8.18.2/data/en_US/item.json', error: TypeError: Cannot read property 'statusCode' of null at kayn.DDragon.Item.list.version.callback }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
kayn.DDragon.Item .list() .version(config.riot_api_version) .callback((error, list) => { if (error) { console.error(error); return message.reply('sorry an api error occurred, please try again.'); }
{ statusCode: undefined, url: 'https://ddragon.leagueoflegends.com/cdn/8.18.2/data/en_US/item.json', error: TypeError: Cannot read property 'statusCode' of null at kayn.DDragon.Item.list.version.callback }
The text was updated successfully, but these errors were encountered: