fix reactions in dms
This commit is contained in:
parent
c3d1674e57
commit
b1fc333bc4
3 changed files with 16 additions and 3 deletions
|
@ -310,7 +310,13 @@ class Localuser{
|
|||
temp.d.guild_id??="@me";
|
||||
const message=SnowFlake.getSnowFlakeFromID(temp.d.message_id,Message).getObject();
|
||||
const guild=SnowFlake.getSnowFlakeFromID(temp.d.guild_id,Guild).getObject();
|
||||
message.giveReaction(temp.d.emoji,new Member(temp.d.member,guild));
|
||||
let thing:Member|{id:string};
|
||||
if(temp.d.member){
|
||||
thing=new Member(temp.d.member,guild);
|
||||
}else{
|
||||
thing={id:temp.d.user_id}
|
||||
}
|
||||
message.giveReaction(temp.d.emoji,thing);
|
||||
}
|
||||
break;
|
||||
case "MESSAGE_REACTION_REMOVE":
|
||||
|
|
|
@ -406,7 +406,7 @@ class Message{
|
|||
}
|
||||
}
|
||||
}
|
||||
giveReaction(data:{name:string},member:Member){
|
||||
giveReaction(data:{name:string},member:Member|{id:string}){
|
||||
for(const thing of this.reactions){
|
||||
if(thing.emoji.name===data.name){
|
||||
thing.count++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue