-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #413 from DanBot-Hosting/poll-ping
feat: poll ping command
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
exports.run = (client, message, args) => { | ||
// Check if user has the dev role | ||
if (!message.member.roles.cache.find((r) => r.id === "898041747597295667")) return; | ||
// Check the message is in the #dev-questions channel | ||
if(message.channel.id !== "1083142107977486389") return message.reply("This command can only be used in <#1083142107977486389>!"); | ||
// Command can only be used every 30 minutes | ||
if(pollPingLastUsed + 1800000 > Date.now()) { | ||
message.reply( | ||
`This command can only be used every 30 minutes! Cooldown expires <t:${(pollPingLastUsed + 1800000).toString().slice(0, -3)}:R>` | ||
) | ||
return; | ||
} | ||
|
||
message.reply("<@&898041781927682090>"); | ||
global.pollPingLastUsed = Date.now(); | ||
}; |
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