This commit is contained in:
Mirco Wittrien 2021-02-04 19:54:17 +01:00
parent d6081ec4d2
commit 3f3655261a
3 changed files with 12 additions and 15 deletions

View File

@ -14,12 +14,12 @@ module.exports = (_ => {
"info": {
"name": "CustomQuoter",
"author": "DevilBro",
"version": "1.2.4",
"version": "1.2.5",
"description": "Customize the output of the native quote feature of Discord"
},
"changeLog": {
"improved": {
"Quick Quote": "Quote button now shows in message toolbar even without holding shift, can be disabled"
"Canary Changes": "Preparing Plugins for the changes that are already done on Discord Canary"
}
}
};
@ -359,7 +359,7 @@ module.exports = (_ => {
quote (channel, message, shift) {
let text = this.parseQuote(message, channel);
if (text && text.length) {
if (shift && !settings.alwaysCopy || !shift && settings.alwaysCopy || !(BDFDB.DMUtils.isDMChannel(channel) || BDFDB.UserUtils.can("SEND_MESSAGES"))) {
if (shift && !settings.alwaysCopy || !shift && settings.alwaysCopy || !(BDFDB.DMUtils.isDMChannel(channel.id) || BDFDB.UserUtils.can("SEND_MESSAGES"))) {
BDFDB.LibraryRequires.electron.clipboard.write({text: text});
BDFDB.NotificationUtils.toast(this.labels.toast_quotecopied, {type: "success"});
}

View File

@ -14,15 +14,12 @@ module.exports = (_ => {
"info": {
"name": "MessageUtilities",
"author": "DevilBro",
"version": "1.8.4",
"version": "1.8.5",
"description": "Offer a number of useful message options. Remap the keybindings in the settings"
},
"changeLog": {
"improved": {
"Performance": ""
},
"fixed": {
"Selection and other weird Issues": "Fixed issues that occured when you patched the channel textarea, wtf discord"
"Canary Changes": "Preparing Plugins for the changes that are already done on Discord Canary"
}
}
};
@ -376,7 +373,7 @@ module.exports = (_ => {
doPinUnPin ({messageDiv, message}, action) {
if (message.state == BDFDB.DiscordConstants.MessageStates.SENT) {
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(message.channel_id);
if (channel && (BDFDB.DMUtils.isDMChannel(channel) || BDFDB.UserUtils.can("MANAGE_MESSAGES")) && message.type == BDFDB.DiscordConstants.MessageTypes.DEFAULT) {
if (channel && (BDFDB.DMUtils.isDMChannel(channel.id) || BDFDB.UserUtils.can("MANAGE_MESSAGES")) && message.type == BDFDB.DiscordConstants.MessageTypes.DEFAULT) {
if (message.pinned) {
BDFDB.LibraryModules.MessagePinUtils.unpinMessage(channel, message.id);
if (toasts[action]) BDFDB.NotificationUtils.toast(this.formatToast(BDFDB.LanguageUtils.LanguageStrings.MESSAGE_UNPINNED), {type: "danger"});
@ -392,7 +389,7 @@ module.exports = (_ => {
doReply ({messageDiv, message}, action) {
if (message.state == BDFDB.DiscordConstants.MessageStates.SENT) {
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(message.channel_id);
if (channel && (BDFDB.DMUtils.isDMChannel(channel) || BDFDB.UserUtils.can("SEND_MESSAGES")) && message.type == BDFDB.DiscordConstants.MessageTypes.DEFAULT) {
if (channel && (BDFDB.DMUtils.isDMChannel(channel.id) || BDFDB.UserUtils.can("SEND_MESSAGES")) && message.type == BDFDB.DiscordConstants.MessageTypes.DEFAULT) {
BDFDB.LibraryModules.MessageManageUtils.replyToMessage(channel, message);
if (toasts[action]) BDFDB.NotificationUtils.toast(this.formatToast(BDFDB.LanguageUtils.LanguageStrings.NOTIFICATION_REPLY), {type: "success"});
}

View File

@ -107,27 +107,27 @@ module.exports = (_ => {
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: _this.labels.context_unreadguilds,
id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-unread-read"),
action: _ => {this.clearGuilds(this.getUnread());}
action: _ => this.clearGuilds(this.getUnread())
}),
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: _this.labels.context_pingedguilds,
id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-pinged-read"),
action: _ => {this.clearGuilds(this.getPinged());}
action: _ => this.clearGuilds(this.getPinged())
}),
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: _this.labels.context_mutedguilds,
id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-muted-read"),
action: _ => {this.clearGuilds(this.getMuted());}
action: _ => this.clearGuilds(this.getMuted())
}),
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: _this.labels.context_guilds,
id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-all-read"),
action: _ => {this.clearGuilds(this.getGuilds());}
action: _ => this.clearGuilds(this.getGuilds())
}),
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: _this.labels.context_dms,
id: BDFDB.ContextMenuUtils.createItemId(_this.name, "mark-dms-read"),
action: _ => {BDFDB.DMUtils.markAsRead(this.getPingedDMs());}
action: _ => BDFDB.DMUtils.markAsRead(this.getPingedDMs())
})
]
}));