JohnTomah

Untitled

Mar 14th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. client.on("message",async msg => {//Alpha_Codes
  2. var prefix = '#';
  3. if(msg.content.startsWith(prefix + "تقديم")){
  4. var channel = msg.guild.channels.find("name", "✽・تقديمات");
  5. if(!channel) return msg.reply("**لا اجد روم باْسم `التقديمات`**")
  6. let fltr = m => m.author.id === msg.author.id
  7. let name = '';
  8. await msg.reply('**اكتب اسمك الان**').then(e => {
  9. msg.channel.awaitMessages(fltr, {
  10. time: 600000,
  11. max: 1
  12. })
  13. .then(co => {
  14. name = co.first().content
  15. co.first().delete()
  16. let age = '';
  17. e.edit(`**${msg.author} اكتب خبراتك**`).then(e => {
  18. msg.channel.awaitMessages(fltr, {
  19. time: 600000,
  20. max: 1
  21. })
  22. .then(co => {
  23. age = co.first().content
  24. co.first().delete();
  25. let from = '';
  26. e.edit(`**${msg.author} وش الفرق بين var و const**`).then(e => {///وش الفرق بين var و const
  27. msg.channel.awaitMessages(fltr, {
  28. time: 600000,
  29. max: 1
  30. })
  31. .then(co => {
  32. from = co.first().content
  33. co.first().delete();
  34. e.edit("**هل انت متأكد من التقديم ؟ | ✅ نعم | ❌ لا**").then(o => {
  35. o.react("❌")
  36. .then(() => o.react('✅'))
  37. .then(() =>o.react('❌'))
  38. let react1 = (reacton, user) => reacton.emoji.name === '✅' && user.id === msg.author.id
  39. let react2 = (reacton, user) => reacton.emoji.name === '❌' && user.id === msg.author.id
  40. let cr1 = o.createReactionCollector(react1, { time: 12000 });
  41. let cr2 = o.createReactionCollector(react2, { time: 12000 });
  42. cr2.on("collect", r => {
  43. msg.reply("**تم الغاء التقديم**").then(k => {
  44. o.delete(2222);
  45. k.delete(2222);
  46.  
  47. })
  48. })
  49. cr1.on("collect", r => {
  50. msg.reply("**تم التقديم بنجاح!**").then(b => {
  51. o.delete(2222);
  52. b.delete(2222);
  53. let emb = new Discord.RichEmbed()
  54. .setTitle("**تقديم للإدارة**")
  55. .addField("**الاسم**", name)
  56. .addField("**خبرتاته**", age)
  57. .addField("**الفرق بين var و const**", from)///.addField("**فائدة الجيسون**", john)
  58. .addField("**الحساب**", msg.author)
  59. .addField("**ايدي الحساب**", msg.author.id)
  60. .setThumbnail(msg.author.avatarURL)
  61. channel.send(emb);
  62. })
  63.  
  64. })
  65. })
  66. })
  67. })
  68. })
  69. })
  70. })
  71. })
  72. }
  73. })
Advertisement
Add Comment
Please, Sign In to add comment