Get rid of exesive logging
This commit is contained in:
parent
3952698d31
commit
0a1b574f2a
12 changed files with 0 additions and 32 deletions
|
@ -265,7 +265,6 @@ class Channel {
|
||||||
if (!this.hasPermission("VIEW_CHANNEL")) {
|
if (!this.hasPermission("VIEW_CHANNEL")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log(this.lastmessageid, !!this.lastmessageid, ":3");
|
|
||||||
return this.lastmessageid !== this.lastreadmessageid && this.type !== 4 && !!this.lastmessageid;
|
return this.lastmessageid !== this.lastreadmessageid && this.type !== 4 && !!this.lastmessageid;
|
||||||
}
|
}
|
||||||
hasPermission(name, member = this.guild.member) {
|
hasPermission(name, member = this.guild.member) {
|
||||||
|
@ -895,7 +894,6 @@ class Channel {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
findClosest(snowflake) {
|
findClosest(snowflake) {
|
||||||
console.log("in here :3");
|
|
||||||
if (!this.lastmessage)
|
if (!this.lastmessage)
|
||||||
return;
|
return;
|
||||||
let flake = this.lastmessage.snowflake;
|
let flake = this.lastmessage.snowflake;
|
||||||
|
@ -903,7 +901,6 @@ class Channel {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
console.log("in here :3");
|
|
||||||
const time = snowflake.getUnixTime();
|
const time = snowflake.getUnixTime();
|
||||||
let flaketime = flake.getUnixTime();
|
let flaketime = flake.getUnixTime();
|
||||||
while (flake && time < flaketime) {
|
while (flake && time < flaketime) {
|
||||||
|
@ -1018,7 +1015,6 @@ class Channel {
|
||||||
}
|
}
|
||||||
const messagez = new Message(messagep.d, this);
|
const messagez = new Message(messagep.d, this);
|
||||||
this.lastmessage = messagez;
|
this.lastmessage = messagez;
|
||||||
console.log(this.lastmessageid, messagez.snowflake, ":3");
|
|
||||||
if (this.lastmessageid) {
|
if (this.lastmessageid) {
|
||||||
this.idToNext.set(this.lastmessageid, messagez.snowflake);
|
this.idToNext.set(this.lastmessageid, messagez.snowflake);
|
||||||
this.idToPrev.set(messagez.snowflake, this.lastmessageid);
|
this.idToPrev.set(messagez.snowflake, this.lastmessageid);
|
||||||
|
|
|
@ -111,10 +111,8 @@ class Emoji {
|
||||||
title.textContent = Emoji.emojis[0].name;
|
title.textContent = Emoji.emojis[0].name;
|
||||||
title.classList.add("emojiTitle");
|
title.classList.add("emojiTitle");
|
||||||
menu.append(title);
|
menu.append(title);
|
||||||
console.log("menu :3");
|
|
||||||
const selection = document.createElement("div");
|
const selection = document.createElement("div");
|
||||||
selection.classList.add("flexltr", "dontshrink", "emojirow");
|
selection.classList.add("flexltr", "dontshrink", "emojirow");
|
||||||
console.log("menu :3");
|
|
||||||
const body = document.createElement("div");
|
const body = document.createElement("div");
|
||||||
body.classList.add("emojiBody");
|
body.classList.add("emojiBody");
|
||||||
let isFirst = true;
|
let isFirst = true;
|
||||||
|
@ -196,7 +194,6 @@ class Emoji {
|
||||||
}
|
}
|
||||||
menu.append(selection);
|
menu.append(selection);
|
||||||
menu.append(body);
|
menu.append(body);
|
||||||
console.log("menu :3");
|
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,6 @@ class Guild {
|
||||||
this.headchannels = [];
|
this.headchannels = [];
|
||||||
for (const thing of this.channels) {
|
for (const thing of this.channels) {
|
||||||
const parent = thing.resolveparent(this);
|
const parent = thing.resolveparent(this);
|
||||||
console.log(parent, ":3");
|
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
this.headchannels.push(thing);
|
this.headchannels.push(thing);
|
||||||
}
|
}
|
||||||
|
@ -359,13 +358,11 @@ class Guild {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getHTML() {
|
getHTML() {
|
||||||
console.log("found :3", this.headchannels);
|
|
||||||
//this.printServers();
|
//this.printServers();
|
||||||
this.sortchannels();
|
this.sortchannels();
|
||||||
this.printServers();
|
this.printServers();
|
||||||
const build = document.createElement("div");
|
const build = document.createElement("div");
|
||||||
for (const thing of this.headchannels) {
|
for (const thing of this.headchannels) {
|
||||||
console.log("found :3");
|
|
||||||
build.appendChild(thing.createguildHTML(this.isAdmin()));
|
build.appendChild(thing.createguildHTML(this.isAdmin()));
|
||||||
}
|
}
|
||||||
return build;
|
return build;
|
||||||
|
|
|
@ -57,7 +57,6 @@ class Message {
|
||||||
});
|
});
|
||||||
Message.contextmenu.addsubmenu("Add reaction", function (e) {
|
Message.contextmenu.addsubmenu("Add reaction", function (e) {
|
||||||
Emoji.emojiPicker(e.x, e.y, this.localuser).then(_ => {
|
Emoji.emojiPicker(e.x, e.y, this.localuser).then(_ => {
|
||||||
console.log(_, ":3");
|
|
||||||
this.reactionToggle(_);
|
this.reactionToggle(_);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -287,7 +286,6 @@ class Message {
|
||||||
author.bind(username);
|
author.bind(username);
|
||||||
});
|
});
|
||||||
reply.onclick = _ => {
|
reply.onclick = _ => {
|
||||||
console.log("this got clicked :3");
|
|
||||||
this.channel.infinite.focus(this.message_reference.message_id);
|
this.channel.infinite.focus(this.message_reference.message_id);
|
||||||
};
|
};
|
||||||
div.appendChild(replyline);
|
div.appendChild(replyline);
|
||||||
|
@ -411,7 +409,6 @@ class Message {
|
||||||
const func = this.channel.infinite.snapBottom();
|
const func = this.channel.infinite.snapBottom();
|
||||||
reactdiv.innerHTML = "";
|
reactdiv.innerHTML = "";
|
||||||
for (const thing of this.reactions) {
|
for (const thing of this.reactions) {
|
||||||
console.log(thing, ":3");
|
|
||||||
const reaction = document.createElement("div");
|
const reaction = document.createElement("div");
|
||||||
reaction.classList.add("reaction");
|
reaction.classList.add("reaction");
|
||||||
if (thing.me) {
|
if (thing.me) {
|
||||||
|
|
|
@ -199,7 +199,6 @@ class ButtonInput {
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
onClickEvent(ev) {
|
onClickEvent(ev) {
|
||||||
console.log("here :3");
|
|
||||||
this.onClick();
|
this.onClick();
|
||||||
}
|
}
|
||||||
watchForChange() { }
|
watchForChange() { }
|
||||||
|
|
|
@ -128,7 +128,6 @@ class User {
|
||||||
}
|
}
|
||||||
resolving = false;
|
resolving = false;
|
||||||
async getBadge(id) {
|
async getBadge(id) {
|
||||||
console.log(id, ":3");
|
|
||||||
if (this.localuser.badges.has(id)) {
|
if (this.localuser.badges.has(id)) {
|
||||||
return this.localuser.badges.get(id);
|
return this.localuser.badges.get(id);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +270,6 @@ class User {
|
||||||
const badgediv = document.createElement("div");
|
const badgediv = document.createElement("div");
|
||||||
badgediv.classList.add("badges");
|
badgediv.classList.add("badges");
|
||||||
(async () => {
|
(async () => {
|
||||||
console.log(this.badge_ids, ":3");
|
|
||||||
if (!this.badge_ids)
|
if (!this.badge_ids)
|
||||||
return;
|
return;
|
||||||
for (const id of this.badge_ids) {
|
for (const id of this.badge_ids) {
|
||||||
|
|
|
@ -272,7 +272,6 @@ class Channel{
|
||||||
}
|
}
|
||||||
get hasunreads():boolean{
|
get hasunreads():boolean{
|
||||||
if(!this.hasPermission("VIEW_CHANNEL")){return false;}
|
if(!this.hasPermission("VIEW_CHANNEL")){return false;}
|
||||||
console.log(this.lastmessageid,!!this.lastmessageid,":3")
|
|
||||||
return this.lastmessageid!==this.lastreadmessageid&&this.type!==4&&!!this.lastmessageid;
|
return this.lastmessageid!==this.lastreadmessageid&&this.type!==4&&!!this.lastmessageid;
|
||||||
}
|
}
|
||||||
hasPermission(name:string,member=this.guild.member):boolean{
|
hasPermission(name:string,member=this.guild.member):boolean{
|
||||||
|
@ -893,11 +892,9 @@ class Channel{
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
private findClosest(snowflake:SnowFlake<Message>){
|
private findClosest(snowflake:SnowFlake<Message>){
|
||||||
console.log("in here :3");
|
|
||||||
if(!this.lastmessage) return;
|
if(!this.lastmessage) return;
|
||||||
let flake:SnowFlake<Message>|null|undefined=this.lastmessage.snowflake;
|
let flake:SnowFlake<Message>|null|undefined=this.lastmessage.snowflake;
|
||||||
if(!snowflake){return};
|
if(!snowflake){return};
|
||||||
console.log("in here :3")
|
|
||||||
const time=snowflake.getUnixTime();
|
const time=snowflake.getUnixTime();
|
||||||
let flaketime=flake.getUnixTime()
|
let flaketime=flake.getUnixTime()
|
||||||
while(flake&&time<flaketime){
|
while(flake&&time<flaketime){
|
||||||
|
@ -1005,7 +1002,6 @@ class Channel{
|
||||||
if(!this.hasPermission("VIEW_CHANNEL")){return}
|
if(!this.hasPermission("VIEW_CHANNEL")){return}
|
||||||
const messagez=new Message(messagep.d,this);
|
const messagez=new Message(messagep.d,this);
|
||||||
this.lastmessage=messagez;
|
this.lastmessage=messagez;
|
||||||
console.log(this.lastmessageid,messagez.snowflake,":3");
|
|
||||||
if(this.lastmessageid){
|
if(this.lastmessageid){
|
||||||
this.idToNext.set(this.lastmessageid,messagez.snowflake);
|
this.idToNext.set(this.lastmessageid,messagez.snowflake);
|
||||||
this.idToPrev.set(messagez.snowflake,this.lastmessageid);
|
this.idToPrev.set(messagez.snowflake,this.lastmessageid);
|
||||||
|
|
|
@ -127,10 +127,8 @@ class Emoji{
|
||||||
title.textContent=Emoji.emojis[0].name;
|
title.textContent=Emoji.emojis[0].name;
|
||||||
title.classList.add("emojiTitle");
|
title.classList.add("emojiTitle");
|
||||||
menu.append(title);
|
menu.append(title);
|
||||||
console.log("menu :3");
|
|
||||||
const selection=document.createElement("div");
|
const selection=document.createElement("div");
|
||||||
selection.classList.add("flexltr","dontshrink","emojirow");
|
selection.classList.add("flexltr","dontshrink","emojirow");
|
||||||
console.log("menu :3");
|
|
||||||
const body=document.createElement("div");
|
const body=document.createElement("div");
|
||||||
body.classList.add("emojiBody");
|
body.classList.add("emojiBody");
|
||||||
|
|
||||||
|
@ -221,7 +219,6 @@ class Emoji{
|
||||||
}
|
}
|
||||||
menu.append(selection);
|
menu.append(selection);
|
||||||
menu.append(body);
|
menu.append(body);
|
||||||
console.log("menu :3");
|
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,6 @@ class Guild{
|
||||||
this.headchannels=[];
|
this.headchannels=[];
|
||||||
for(const thing of this.channels){
|
for(const thing of this.channels){
|
||||||
const parent=thing.resolveparent(this);
|
const parent=thing.resolveparent(this);
|
||||||
console.log(parent,":3")
|
|
||||||
if(!parent){
|
if(!parent){
|
||||||
this.headchannels.push(thing);
|
this.headchannels.push(thing);
|
||||||
}
|
}
|
||||||
|
@ -367,14 +366,12 @@ class Guild{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getHTML(){
|
getHTML(){
|
||||||
console.log("found :3",this.headchannels)
|
|
||||||
//this.printServers();
|
//this.printServers();
|
||||||
this.sortchannels();
|
this.sortchannels();
|
||||||
this.printServers();
|
this.printServers();
|
||||||
const build=document.createElement("div");
|
const build=document.createElement("div");
|
||||||
|
|
||||||
for(const thing of this.headchannels){
|
for(const thing of this.headchannels){
|
||||||
console.log("found :3")
|
|
||||||
build.appendChild(thing.createguildHTML(this.isAdmin()));
|
build.appendChild(thing.createguildHTML(this.isAdmin()));
|
||||||
}
|
}
|
||||||
return build;
|
return build;
|
||||||
|
|
|
@ -62,7 +62,6 @@ class Message{
|
||||||
});
|
});
|
||||||
Message.contextmenu.addsubmenu("Add reaction",function(this:Message,e){
|
Message.contextmenu.addsubmenu("Add reaction",function(this:Message,e){
|
||||||
Emoji.emojiPicker(e.x,e.y,this.localuser).then(_=>{
|
Emoji.emojiPicker(e.x,e.y,this.localuser).then(_=>{
|
||||||
console.log(_,":3")
|
|
||||||
this.reactionToggle(_);
|
this.reactionToggle(_);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -285,7 +284,6 @@ class Message{
|
||||||
author.bind(username);
|
author.bind(username);
|
||||||
});
|
});
|
||||||
reply.onclick=_=>{
|
reply.onclick=_=>{
|
||||||
console.log("this got clicked :3")
|
|
||||||
this.channel.infinite.focus(this.message_reference.message_id);
|
this.channel.infinite.focus(this.message_reference.message_id);
|
||||||
}
|
}
|
||||||
div.appendChild(replyline);
|
div.appendChild(replyline);
|
||||||
|
@ -411,7 +409,6 @@ class Message{
|
||||||
const func=this.channel.infinite.snapBottom();
|
const func=this.channel.infinite.snapBottom();
|
||||||
reactdiv.innerHTML="";
|
reactdiv.innerHTML="";
|
||||||
for(const thing of this.reactions){
|
for(const thing of this.reactions){
|
||||||
console.log(thing,":3")
|
|
||||||
const reaction=document.createElement("div");
|
const reaction=document.createElement("div");
|
||||||
reaction.classList.add("reaction");
|
reaction.classList.add("reaction");
|
||||||
if(thing.me){
|
if(thing.me){
|
||||||
|
|
|
@ -202,7 +202,6 @@ class ButtonInput implements OptionsElement{
|
||||||
return div;
|
return div;
|
||||||
}
|
}
|
||||||
private onClickEvent(ev:Event){
|
private onClickEvent(ev:Event){
|
||||||
console.log("here :3")
|
|
||||||
this.onClick();
|
this.onClick();
|
||||||
}
|
}
|
||||||
watchForChange(){}
|
watchForChange(){}
|
||||||
|
|
|
@ -129,7 +129,6 @@ class User{
|
||||||
}
|
}
|
||||||
resolving:false|Promise<any>=false;
|
resolving:false|Promise<any>=false;
|
||||||
async getBadge(id:string){
|
async getBadge(id:string){
|
||||||
console.log(id,":3")
|
|
||||||
if(this.localuser.badges.has(id)){
|
if(this.localuser.badges.has(id)){
|
||||||
return this.localuser.badges.get(id);
|
return this.localuser.badges.get(id);
|
||||||
}else{
|
}else{
|
||||||
|
@ -274,7 +273,6 @@ class User{
|
||||||
const badgediv=document.createElement("div");
|
const badgediv=document.createElement("div");
|
||||||
badgediv.classList.add("badges");
|
badgediv.classList.add("badges");
|
||||||
(async ()=>{
|
(async ()=>{
|
||||||
console.log(this.badge_ids,":3")
|
|
||||||
if(!this.badge_ids) return;
|
if(!this.badge_ids) return;
|
||||||
for(const id of this.badge_ids){
|
for(const id of this.badge_ids){
|
||||||
const badgejson=await this.getBadge(id);
|
const badgejson=await this.getBadge(id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue