mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-10-24 08:22:23 +00:00
swap reply and edit buttons
This commit is contained in:
1 parent
69a77c38b2
commit
3ef6ac8061
2 files changed
+19
-15
No files matched your search
@@ -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) {
|
||||
|
||||
+14
-14
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user