This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthew Ray
committed
Sep 26, 2018
1 parent
a1995e0
commit 1cebe40
Showing
2 changed files
with
47 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
const Discord = require("discord.js"); | ||
const talkedRecently = new Set(); | ||
exports.run = async (client, message) => { | ||
const msg = await message.channel.send("Ping..."); | ||
|
||
msg.edit(`Ping! \`${msg.createdTimestamp - message.createdTimestamp}ms\``) | ||
if (talkedRecently.has(message.author.id) && !message.member.roles.has("490364533550874644")) { | ||
|
||
message.channel.send("You are being rate limited!" + message.author); | ||
} else { // eslint-disable-line no-unused-vars | ||
const msg = await message.channel.send("Ping?"); | ||
const embed = new Discord.RichEmbed() | ||
.setAuthor(`${client.user.username}`, `${client.user.avatarURL}`) | ||
.setColor(message.member.displayColor) | ||
.addField("• Ping Latency", `${msg.createdTimestamp - message.createdTimestamp}ms`, true) | ||
.addField("• API Latency", `${Math.round(client.ping)}ms`, true) | ||
.setFooter(`${client.user.username} | Beta - Master`); | ||
msg.edit(embed); | ||
talkedRecently.add(message.author.id); | ||
setTimeout(() => { | ||
// Removes the user from the set after a minute | ||
talkedRecently.delete(message.author.id); | ||
}, 2000); | ||
}; | ||
} | ||
|
||
exports.conf = { | ||
enabled: true, | ||
guildOnly: false, | ||
aliases: [], | ||
permLevel: "Standard User" | ||
}; | ||
exports.help = { | ||
name: "eping", | ||
category: "Misc", | ||
description: "Pings the bot, without the embed.", | ||
usage: "eping" | ||
}; | ||
enabled: true, | ||
guildOnly: false, | ||
aliases: [], | ||
permLevel: "Standard User" | ||
}; | ||
|
||
exports.help = { | ||
name: "ping", | ||
category: "Misc", | ||
description: "Pings the bot, responds with API and regular latencies.", | ||
usage: "ping" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
const Discord = require("discord.js"); | ||
const talkedRecently = new Set(); | ||
exports.run = async (client, message) => { | ||
if (talkedRecently.has(message.author.id) && !message.member.roles.has("490364533550874644")) { | ||
|
||
message.channel.send("You are being rate limited!" + message.author); | ||
} else { // eslint-disable-line no-unused-vars | ||
const msg = await message.channel.send("Ping?"); | ||
const embed = new Discord.RichEmbed() | ||
.setAuthor(`${client.user.username}`, `${client.user.avatarURL}`) | ||
.setColor(message.member.displayColor) | ||
.addField("• Ping Latency", `${msg.createdTimestamp - message.createdTimestamp}ms`, true) | ||
.addField("• API Latency", `${Math.round(client.ping)}ms`, true) | ||
.setFooter(`${client.user.username} | Beta - Master`); | ||
msg.edit(embed); | ||
talkedRecently.add(message.author.id); | ||
setTimeout(() => { | ||
// Removes the user from the set after a minute | ||
talkedRecently.delete(message.author.id); | ||
}, 2000); | ||
}; | ||
const msg = await message.channel.send("Ping..."); | ||
|
||
msg.edit(`🏓 Pong! \`${msg.createdTimestamp - message.createdTimestamp}ms\``) | ||
} | ||
|
||
exports.conf = { | ||
enabled: true, | ||
guildOnly: false, | ||
aliases: [], | ||
permLevel: "Standard User" | ||
}; | ||
|
||
exports.help = { | ||
name: "ping", | ||
category: "Misc", | ||
description: "Pings the bot, responds with API and regular latencies.", | ||
usage: "ping" | ||
}; | ||
enabled: true, | ||
guildOnly: false, | ||
aliases: [], | ||
permLevel: "Standard User" | ||
}; | ||
exports.help = { | ||
name: "ping", | ||
category: "Misc", | ||
description: "Pings the bot, without the embed.", | ||
usage: "ping" | ||
}; |