Facebook
From merlin#9999, 3 Years ago, written in JavaScript.
This paste is a reply to Gelişmiş Ping Komutu from merlin#9999 - view diff
Embed
Download Paste or View Raw
Hits: 109
  1. const Discord = require('discord.js');
  2. const db = require("quick.db")
  3.  
  4. exports.run = async(client, message, args) => {
  5.  
  6. let pingmesaj;
  7. let pingdurum;
  8.  
  9. let mesaj;
  10.   let mesajdurum;
  11. if(Date.now() - message.createdAt < 100){
  12. mesaj = ":red_circle:"
  13. mesajdurum = "#ff0000"
  14. }
  15. if(Date.now() - message.createdAt < 60){
  16. mesaj = ":yellow_circle:"
  17. mesajdurum = "#ffff00"
  18. }
  19. if(Date.now() - message.createdAt < 30){
  20. mesaj = ":green_circle: "
  21. mesajdurum = "#66ff00"
  22. }
  23. if(Date.now() - message.createdAt > 100){
  24. mesaj = ":red_circle:"
  25. mesajdurum = "#ff0000"
  26. }
  27.  
  28. if(Date.now() - message.createdAt > 60){
  29. mesaj = ":yellow_circle:"
  30. mesajdurum = "#ffff00"
  31. }
  32. if(Date.now() - message.createdAt > 150){
  33. mesaj = ":red_circle:"
  34. mesajdurum = "#ff0000"
  35. }
  36. if(Date.now() - message.createdAt > 250){
  37. mesaj = ":red_circle:"
  38. mesajdurum = "#ff0000"
  39. }
  40. if(Date.now() - message.createdAt > 500){
  41. mesaj = ":white_circle: "
  42. mesajdurum = "#66ff00"
  43. }
  44. if(Date.now() - message.createdAt > 1000){
  45. mesaj = ":white_circle: "
  46. mesajdurum = "#66ff00"
  47. }
  48. /*for(var emojilers in client.emojiler){
  49. let emojis = client.emojis.get(emojilers)
  50. }*/
  51. if(client.ping < 100){
  52. pingmesaj = ":red_circle:"
  53. pingdurum = "#ff0000"
  54. }
  55. if(client.ping < 60){
  56. pingmesaj = ":yellow_circle:"
  57. pingdurum = "#ffff00"
  58. }
  59. if(client.ping < 30){
  60. pingmesaj = ":green_circle: "
  61. pingdurum = "#66ff00"
  62. }
  63. if(client.ping > 100){
  64. pingmesaj = ":red_circle:"
  65. pingdurum = "#ff0000"
  66. }
  67.  
  68. if(client.ping > 60){
  69. pingmesaj = ":yellow_circle:"
  70. pingdurum = "#ffff00"
  71. }
  72. if(client.ping > 150){
  73. pingmesaj = ":red_circle:"
  74. pingdurum = "#ff0000"
  75. }
  76. if(client.ping > 250){
  77. pingmesaj = ":red_circle:"
  78. pingdurum = "#ff0000"
  79. }
  80. if(client.ping > 500){
  81. pingmesaj = ":white_circle: "
  82. pingdurum = "#66ff00"
  83. }
  84. if(client.ping > 1000){
  85. pingmesaj = ":white_circle: "
  86. pingdurum = "#66ff00"
  87. }
  88. const embed = new Discord.RichEmbed()
  89. .setAuthor(message.author.username + " Adlı kullanıcı tarafından istendi.",message.author.avatarURL)
  90. .setThumbnail(client.user.avatarURL)
  91. .setDescription(`Gecikme: ${client.ping.toFixed(2)+ "ms"} ${pingmesaj}\n\nMesaj Gecikmesi: ${(Date.now() - message.createdAt).toFixed(2)+ "ms"} ${mesaj}`)
  92. .setColor(pingdurum)
  93. .setFooter(client.user.username, client.user.avatarURL)
  94. message.channel.send(embed)
  95.  
  96. }
  97.  
  98.  
  99.  
  100.  
  101. exports.conf = {
  102.   enabled: true,
  103.   guildOnly: false,
  104.   aliases: [],
  105.   permLevel: 0
  106. };
  107.  
  108. exports.help = {
  109.   name: 'ping',
  110. };