Advertisement
3MoSteve

Reply Code

Dec 7th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. const replys_config = [{
  2. "message": "باك",
  3. "reply": "ولكم",
  4. "time": "3s",
  5. "includes": false
  6. },
  7. {
  8. "message": "برب",
  9. "reply": "تيت",
  10. "time": null,
  11. "includes": true
  12. },
  13. {
  14. "message": "مرحبا",
  15. "reply": "هلا",
  16. "time": "2s",
  17. "includes": true
  18. }
  19. ]
  20. /*
  21. "message": الرسالة,
  22. "reply": الرد
  23. "time": علشان يرد بسرعة مايكون في وقت null الوقت او اكتب
  24. "includes": مارح يرد البوت الا لو الرسالة بس الي انكتبت false رح يرد البوت عليه حتى لو الرسالة انكتبت بلنص او بلبداية او بلنهاية لو تخليها true لو تخليها
  25. */
  26. client.on("message", message => {
  27. if (message.author.bot || !message.guild) return false;
  28. var data = replys_config.find(reply => (message.content.includes(reply.message) && reply.includes) || (message.content == reply.message));
  29. if (data) {
  30. setTimeout(() => {
  31. message.channel.send(data.reply);
  32. }, (data.time != null ? require("ms")(data.time) : 0));
  33. }
  34. });
  35. //Reply Code after time By 3Mo_Steve
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement