renamed functions

This commit is contained in:
MathMan05 2024-08-23 13:45:49 -05:00
parent b9745a5015
commit 5762a2a61c
4 changed files with 8 additions and 8 deletions

View file

@ -369,14 +369,14 @@ class Localuser {
else { else {
thing = { id: temp.d.user_id }; thing = { id: temp.d.user_id };
} }
message.giveReaction(temp.d.emoji, thing); message.makeReaction(temp.d.emoji, thing);
} }
break; break;
case "MESSAGE_REACTION_REMOVE": case "MESSAGE_REACTION_REMOVE":
if (SnowFlake.hasSnowFlakeFromID(temp.d.message_id, Message)) { if (SnowFlake.hasSnowFlakeFromID(temp.d.message_id, Message)) {
const message = SnowFlake.getSnowFlakeFromID(temp.d.message_id, Message).getObject(); const message = SnowFlake.getSnowFlakeFromID(temp.d.message_id, Message).getObject();
console.log("test"); console.log("test");
message.takeReaction(temp.d.emoji, temp.d.user_id); message.removeReaction(temp.d.emoji, temp.d.user_id);
} }
break; break;
case "GUILD_MEMBERS_CHUNK": case "GUILD_MEMBERS_CHUNK":

View file

@ -511,7 +511,7 @@ class Message {
} }
func(); func();
} }
giveReaction(data, member) { makeReaction(data, member) {
for (const thing of this.reactions) { for (const thing of this.reactions) {
if (thing.emoji.name === data.name) { if (thing.emoji.name === data.name) {
thing.count++; thing.count++;
@ -529,7 +529,7 @@ class Message {
}); });
this.updateReactions(); this.updateReactions();
} }
takeReaction(data, id) { removeReaction(data, id) {
console.log("test"); console.log("test");
for (const i in this.reactions) { for (const i in this.reactions) {
const thing = this.reactions[i]; const thing = this.reactions[i];

View file

@ -374,7 +374,7 @@ class Localuser{
}else{ }else{
thing={id:temp.d.user_id} thing={id:temp.d.user_id}
} }
message.giveReaction(temp.d.emoji,thing); message.makeReaction(temp.d.emoji,thing);
} }
break; break;
case "MESSAGE_REACTION_REMOVE": case "MESSAGE_REACTION_REMOVE":
@ -382,7 +382,7 @@ class Localuser{
const message=SnowFlake.getSnowFlakeFromID(temp.d.message_id,Message).getObject(); const message=SnowFlake.getSnowFlakeFromID(temp.d.message_id,Message).getObject();
console.log("test"); console.log("test");
message.takeReaction(temp.d.emoji,temp.d.user_id); message.removeReaction(temp.d.emoji,temp.d.user_id);
} }
break; break;
case "GUILD_MEMBERS_CHUNK": case "GUILD_MEMBERS_CHUNK":

View file

@ -509,7 +509,7 @@ class Message{
} }
func(); func();
} }
giveReaction(data:{name:string},member:Member|{id:string}){ makeReaction(data:{name:string},member:Member|{id:string}){
for(const thing of this.reactions){ for(const thing of this.reactions){
if(thing.emoji.name===data.name){ if(thing.emoji.name===data.name){
thing.count++; thing.count++;
@ -527,7 +527,7 @@ class Message{
}); });
this.updateReactions(); this.updateReactions();
} }
takeReaction(data:{name:string},id:string){ removeReaction(data:{name:string},id:string){
console.log("test"); console.log("test");
for(const i in this.reactions){ for(const i in this.reactions){
const thing=this.reactions[i]; const thing=this.reactions[i];