diff --git a/src/webpage/member.ts b/src/webpage/member.ts index 496fa6b..23fa8d8 100644 --- a/src/webpage/member.ts +++ b/src/webpage/member.ts @@ -338,9 +338,13 @@ class Member extends SnowFlake { this.roles = []; for (const strrole of memberjson.roles) { const role = this.guild.roleids.get(strrole); - if (!role) continue; + if (!role) { + console.warn(strrole + " is not in ", this.guild.roleids); + continue; + } this.roles.push(role); } + if (!this.user.bot) { const everyone = this.guild.roleids.get(this.guild.id); if (everyone && this.roles.indexOf(everyone) === -1) { diff --git a/src/webpage/message.ts b/src/webpage/message.ts index ceb3849..fa941a3 100644 --- a/src/webpage/message.ts +++ b/src/webpage/message.ts @@ -78,20 +78,6 @@ class Message extends SnowFlake { Message.setupcmenu(); } static setupcmenu() { - Message.contextmenu.addButton( - () => I18n.reply(), - function (this: Message) { - this.channel.setReplying(this); - }, - { - icon: { - css: "svg-reply", - }, - visible: function () { - return !this.ephemeral && this.channel.hasPermission("SEND_MESSAGES"); - }, - }, - ); const editTypes = new Set([0, 19]); Message.contextmenu.addButton( () => I18n.message.edit(), @@ -108,6 +94,20 @@ class Message extends SnowFlake { }, }, ); + Message.contextmenu.addButton( + () => I18n.reply(), + function (this: Message) { + this.channel.setReplying(this); + }, + { + icon: { + css: "svg-reply", + }, + visible: function () { + return !this.ephemeral && this.channel.hasPermission("SEND_MESSAGES"); + }, + }, + ); Message.contextmenu.addButton( () => I18n.message.reactionAdd(),