More caching stuff, changed info command a bit
This commit is contained in:
parent
ef945adf09
commit
873b3f59bc
3 changed files with 18 additions and 8 deletions
|
@ -24,14 +24,14 @@ exports.run = async () => {
|
|||
},
|
||||
{
|
||||
"name": "✅ Official Server:",
|
||||
"value": "[Click here!](https://discord.gg/vfFM7YT)"
|
||||
"value": "[Click here!](https://projectlounge.pw/support)"
|
||||
},
|
||||
{
|
||||
"name": "💻 Source Code:",
|
||||
"value": "[Click here!](https://github.com/esmBot/esmBot)"
|
||||
},
|
||||
{
|
||||
"name": "<:twitter:652550515372064768> Twitter:",
|
||||
"name": "🐦 Twitter:",
|
||||
"value": "[Click here!](https://twitter.com/esmBot_)"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"absolutely nothing",
|
||||
"Mozilla Firefox",
|
||||
"Google Chrome",
|
||||
"music bot soon I guess",
|
||||
"music bot now I guess",
|
||||
"Fortnut",
|
||||
"epic mashups bro",
|
||||
"Netscape Navigator",
|
||||
|
@ -107,11 +107,9 @@
|
|||
"with chimps",
|
||||
"with the TF2 source code",
|
||||
"alvin the chipmunk nightcore",
|
||||
"braaaaap",
|
||||
"Schmelf?",
|
||||
"Troll",
|
||||
"ay yo the pizza here",
|
||||
"100 gecs",
|
||||
"with limited resources",
|
||||
"free bjs at papa johns"
|
||||
"messages from 2018"
|
||||
]
|
|
@ -2,5 +2,17 @@ exports.commands = new Map();
|
|||
exports.aliases = new Map();
|
||||
exports.info = new Map();
|
||||
|
||||
exports.prefixCache = new Map();
|
||||
exports.disabledCache = new Map();
|
||||
class Cache extends Map {
|
||||
constructor(values) {
|
||||
super(values);
|
||||
this.maxValues = 1024;
|
||||
}
|
||||
|
||||
set(key, value) {
|
||||
super.set(key, value);
|
||||
if (this.size > this.maxValues) this.delete(this.keys().next().value);
|
||||
}
|
||||
}
|
||||
|
||||
exports.prefixCache = new Cache();
|
||||
exports.disabledCache = new Cache();
|
Loading…
Reference in a new issue