more checks for staying at bottom
This commit is contained in:
parent
12ad9c00b9
commit
71dd54fc0e
4 changed files with 27 additions and 7 deletions
|
@ -110,6 +110,7 @@ class Message{
|
|||
})
|
||||
}
|
||||
giveData(messagejson:messagejson){
|
||||
const func=this.channel.infinite.snapBottom();
|
||||
for(const thing of Object.keys(messagejson)){
|
||||
if(thing==="attachments"){
|
||||
this.attachments=[];
|
||||
|
@ -158,6 +159,7 @@ class Message{
|
|||
if(this.div){
|
||||
this.generateMessage();
|
||||
}
|
||||
func();
|
||||
}
|
||||
canDelete(){
|
||||
return this.channel.hasPermission("MANAGE_MESSAGES")||this.author.snowflake===this.localuser.user.snowflake;
|
||||
|
@ -394,6 +396,7 @@ class Message{
|
|||
updateReactions(){
|
||||
const reactdiv=this.reactdiv.deref();
|
||||
if(!reactdiv) return;
|
||||
const func=this.channel.infinite.snapBottom();
|
||||
reactdiv.innerHTML="";
|
||||
for(const thing of this.reactions){
|
||||
console.log(thing,":3")
|
||||
|
@ -422,6 +425,7 @@ class Message{
|
|||
this.reactionToggle(thing.emoji.name);
|
||||
}
|
||||
}
|
||||
func();
|
||||
}
|
||||
giveReaction(data:{name:string},member:Member|{id:string}){
|
||||
for(const thing of this.reactions){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue