More rewrites

This commit is contained in:
hydrabolt
2015-10-31 18:03:35 +00:00
parent beab032811
commit 6064888f21
26 changed files with 737 additions and 24 deletions

29
src/Util/Equality.js Normal file
View File

@@ -0,0 +1,29 @@
/*
The Equality Class is just used to show
that a Class has an ID that can be used to
check for equality.
Never use == or === when comparing
objects in discord.js, they will be different
instances sometimes.
Instead, use objectThatExtendsEquality.equals()
*/
class Equality{
constructor(){
}
get eqDiscriminator(){
return "id";
}
equals(object){
if(object && object[this.eqDiscriminator] == this[this.eqDiscriminator]){
return true;
}
return false;
}
}
module.exports = Equality;