fixes
This commit is contained in:
parent
eefe4e29ba
commit
6ed3199b9d
|
@ -2,7 +2,7 @@
|
|||
* @name ShowHiddenChannels
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 3.0.5
|
||||
* @version 3.0.6
|
||||
* @description Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,8 +17,13 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "ShowHiddenChannels",
|
||||
"author": "DevilBro",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"description": "Displays all hidden Channels, which can't be accessed due to Role Restrictions, this won't allow you to read them (impossible)"
|
||||
},
|
||||
"changeLog": {
|
||||
"fixed": {
|
||||
"Permissions Tabs": "Fixed Issue, where Users that are specifically allowed/denied weren't listed in the tabs"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -568,8 +573,10 @@ module.exports = (_ => {
|
|||
let isThread = BDFDB.ChannelUtils.isThread(channel);
|
||||
let guild = BDFDB.LibraryModules.GuildStore.getGuild(channel.guild_id);
|
||||
let myMember = guild && BDFDB.LibraryModules.MemberStore.getMember(guild.id, BDFDB.UserUtils.me.id);
|
||||
|
||||
let parentChannel = isThread && BDFDB.LibraryModules.ChannelStore.getChannel(BDFDB.LibraryModules.ChannelStore.getChannel(channel.id).parent_id);
|
||||
let category = parentChannel && parentChannel.parent_id && BDFDB.LibraryModules.ChannelStore.getChannel(parentChannel.parent_id) || BDFDB.LibraryModules.ChannelStore.getChannel(BDFDB.LibraryModules.ChannelStore.getChannel(channel.id).parent_id);
|
||||
|
||||
let lightTheme = BDFDB.DiscordUtils.getTheme() == BDFDB.disCN.themelight;
|
||||
|
||||
let addUser = (id, users) => {
|
||||
|
@ -578,10 +585,10 @@ module.exports = (_ => {
|
|||
else users.push({id: id, username: `UserId: ${id}`, fetchable: true});
|
||||
};
|
||||
let checkAllowPerm = permString => {
|
||||
return ((permString | BDFDB.DiscordConstants.Permissions.VIEW_CHANNEL) == permString && ((permString | BDFDB.DiscordConstants.Permissions.READ_MESSAGE_HISTORY) == permString || channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE && (permString | BDFDB.DiscordConstants.Permissions.CONNECT) == permString));
|
||||
return (permString | BDFDB.DiscordConstants.Permissions.VIEW_CHANNEL) == permString && (channel.type != BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE || (permString | BDFDB.DiscordConstants.Permissions.CONNECT) == permString);
|
||||
};
|
||||
let checkDenyPerm = permString => {
|
||||
return ((permString | BDFDB.DiscordConstants.Permissions.VIEW_CHANNEL) == permString || (permString | BDFDB.DiscordConstants.Permissions.READ_MESSAGE_HISTORY) == permString || channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE && (permString | BDFDB.DiscordConstants.Permissions.CONNECT) == permString);
|
||||
return (permString | BDFDB.DiscordConstants.Permissions.VIEW_CHANNEL) == permString || (channel.type == BDFDB.DiscordConstants.ChannelTypes.GUILD_VOICE && (permString | BDFDB.DiscordConstants.Permissions.CONNECT) == permString);
|
||||
};
|
||||
|
||||
let allowedRoles = [], allowedUsers = [], deniedRoles = [], deniedUsers = [], everyoneDenied = false;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name Translator
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 2.3.4
|
||||
* @version 2.3.5
|
||||
* @description Allows you to translate Messages and your outgoing Messages within Discord
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -17,7 +17,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "Translator",
|
||||
"author": "DevilBro",
|
||||
"version": "2.3.4",
|
||||
"version": "2.3.5",
|
||||
"description": "Allows you to translate Messages and your outgoing Messages within Discord"
|
||||
}
|
||||
};
|
||||
|
@ -642,7 +642,7 @@ module.exports = (_ => {
|
|||
|
||||
processChannelTextAreaForm (e) {
|
||||
BDFDB.PatchUtils.patch(this, e.instance, "handleSendMessage", {instead: e2 => {
|
||||
if (this.isTranslationEnabled(e.instance.props.channel.id)) {
|
||||
if (this.isTranslationEnabled(e.instance.props.channel.id) && e2.methodArguments[0]) {
|
||||
e2.stopOriginalMethodCall();
|
||||
this.translateText(e2.methodArguments[0], messageTypes.SENT, (translation, input, output) => {
|
||||
translation = !translation ? e2.methodArguments[0] : (this.settings.general.sendOriginalMessage ? (translation + "\n\n> *" + e2.methodArguments[0].split("\n").join("*\n> *") + "*") : translation);
|
||||
|
|
Loading…
Reference in New Issue