-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
8 changed files
with
144 additions
and
8 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
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,6 +1,17 @@ | ||
'use strict'; | ||
const Discord = require('discord.js'); | ||
const config = require('../config.js'); | ||
|
||
module.exports = { | ||
message_regex: /^\.fhq(?: (?:\/u\/)?([\w-]+))?/, | ||
response: ({ message_match: [, username] }) => `https://hq.porygon.co${username ? `/u/${username}` : ''}` | ||
response: ({ message_match: [, username] }) => `https://hq.porygon.co${username ? `/u/${username}` : ''}`, | ||
richResponse: ({ message_match: [, username] }) => { | ||
const embedColor = config.discord.embedColor[Math.floor(Math.random()*config.discord.embedColor.length)]; | ||
const embed = new Discord.RichEmbed() | ||
.setTitle(`/u/${username} Flair HQ`, 'https://hq.porygon.co/images/fhq-500.png') | ||
.setURL(`https://hq.porygon.co/u/${username}`) | ||
.setColor(embedColor) | ||
|
||
return embed; | ||
} | ||
}; |
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
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
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
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,10 +1,21 @@ | ||
// States the current time and the uptime each minute. This is very irritating in practice and enabling it is not recommended. | ||
'use strict'; | ||
const Discord = require('discord.js'); | ||
const config = require('../config.js'); | ||
|
||
let counter = 0; | ||
module.exports = { | ||
period: 60, | ||
onStart: true, | ||
task () { | ||
return `The time is now ${new Date().toTimeString()}. This bot was last restarted ${counter++} minutes ago.`; | ||
counter++; | ||
const embedColor = config.discord.embedColor[Math.floor(Math.random()*config.discord.embedColor.length)]; | ||
const embed = new Discord.RichEmbed() | ||
.setColor(embedColor) | ||
.setDescription(`The time is now ${new Date().toTimeString()}. This bot was last restarted ${counter} minutes ago.`) | ||
return { | ||
text: `The time is now ${new Date().toTimeString()}. This bot was last restarted ${counter} minutes ago.`, | ||
richText: embed | ||
} | ||
} | ||
}; |
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
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 |
---|---|---|
|
@@ -88,6 +88,11 @@ assertion-error@^1.0.1: | |
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" | ||
|
||
async-limiter@~1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" | ||
integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== | ||
|
||
asynckit@^0.4.0: | ||
version "0.4.0" | ||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" | ||
|
@@ -276,6 +281,17 @@ [email protected]: | |
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" | ||
|
||
discord.js@^11.4.2: | ||
version "11.4.2" | ||
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-11.4.2.tgz#54586981926521572051f2a30b984aad2b49786e" | ||
integrity sha512-MDwpu0lMFTjqomijDl1Ed9miMQe6kB4ifKdP28QZllmLv/HVOJXhatRgjS8urp/wBlOfx+qAYSXcdI5cKGYsfg== | ||
dependencies: | ||
long "^4.0.0" | ||
prism-media "^0.0.3" | ||
snekfetch "^3.6.4" | ||
tweetnacl "^1.0.0" | ||
ws "^4.0.0" | ||
|
||
doctrine@^1.2.2: | ||
version "1.5.0" | ||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" | ||
|
@@ -763,6 +779,11 @@ [email protected], lodash@^4.0.0, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1: | |
version "4.17.10" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" | ||
|
||
long@^4.0.0: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" | ||
integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== | ||
|
||
lru-cache@2: | ||
version "2.7.3" | ||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" | ||
|
@@ -948,6 +969,11 @@ prelude-ls@~1.1.2: | |
version "1.1.2" | ||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" | ||
|
||
prism-media@^0.0.3: | ||
version "0.0.3" | ||
resolved "https://registry.yarnpkg.com/prism-media/-/prism-media-0.0.3.tgz#8842d4fae804f099d3b48a9a38e3c2bab6f4855b" | ||
integrity sha512-c9KkNifSMU/iXT8FFTaBwBMr+rdVcN+H/uNv1o+CuFeTThNZNTOrQ+RgXA1yL/DeLk098duAeRPP3QNPNbhxYQ== | ||
|
||
process-nextick-args@~1.0.6: | ||
version "1.0.7" | ||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" | ||
|
@@ -1104,6 +1130,11 @@ [email protected]: | |
version "0.0.4" | ||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" | ||
|
||
snekfetch@^3.6.4: | ||
version "3.6.4" | ||
resolved "https://registry.yarnpkg.com/snekfetch/-/snekfetch-3.6.4.tgz#d13e80a616d892f3d38daae4289f4d258a645120" | ||
integrity sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw== | ||
|
||
snoowrap@^1.8.1: | ||
version "1.15.2" | ||
resolved "https://registry.yarnpkg.com/snoowrap/-/snoowrap-1.15.2.tgz#2086fcb911c64356c04a6e601e2eed23079acaa4" | ||
|
@@ -1227,6 +1258,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: | |
version "0.14.5" | ||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" | ||
|
||
tweetnacl@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.0.tgz#713d8b818da42068740bf68386d0479e66fc8a7b" | ||
integrity sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins= | ||
|
||
type-check@~0.3.2: | ||
version "0.3.2" | ||
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" | ||
|
@@ -1292,6 +1328,14 @@ ws@^1.1.1: | |
options ">=0.0.5" | ||
ultron "1.0.x" | ||
|
||
ws@^4.0.0: | ||
version "4.1.0" | ||
resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" | ||
integrity sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA== | ||
dependencies: | ||
async-limiter "~1.0.0" | ||
safe-buffer "~5.1.0" | ||
|
||
xtend@^4.0.0: | ||
version "4.0.1" | ||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" |