JohnTomah

Untitled

Mar 18th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. const _3amyah = require("3amyah");
  2. client.on("message", msg =>{
  3. if(msg.content.startsWith(`${prefix}3amyh`)){
  4. let Word = msg.content.split(` `).slice(1).join(' ');
  5. if(!Word) return msg.reply("الرجاء ادخال الكلمة المراد البحث عنها").then(z=>z.delete(3000));
  6. _3amyah.search(Word).then(words => {
  7. if(!words[1]) return msg.reply("لم يتم العثور على الكلمة").then(z=>z.delete(3000));
  8.  
  9. let embed = new Discord.RichEmbed()
  10. .setColor("RANDOM")
  11. .setAuthor(msg.author.username,msg.author.displayAvatarURL)
  12. .setThumbnail(msg.author.displayAvatarURL)
  13. .setTimestamp()
  14. .addField("**الكلمة**",`**${words[1]["word"].replace(/`@/g,"")}**`,true)
  15. .addField("**معنى الكلمة**",`**${words[1]["definition"].replace(/`@/g,"")}**`,true)
  16. .addField("**مثال**",`**${words[1]["example"].replace(/`@/g,"")}**`,true)
  17. .addField("**تم اضافة الكلمة من قبل**",`**${words[1]["author"].replace(/`@/g,"")}**`,true)
  18. .addField("**تستخدم هذي الكلمة في**",`**${words[1]["countryList"]}**`,true)
  19. .addField("**تاريخ اضافة الكلمة**",`**${words[1]["dateCreated"].replace(/`@/g,"")}**`,true)
  20. msg.channel.send(embed);
  21. })
  22. }})
Advertisement
Add Comment
Please, Sign In to add comment