mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Removed redundant parenthesis
This commit is contained in:
@@ -20,8 +20,8 @@ public class CustomReactions : NadekoModule<CustomReactionsService>
|
||||
_clientFactory = clientFactory;
|
||||
}
|
||||
|
||||
private bool AdminInGuildOrOwnerInDm() => (ctx.Guild is null && _creds.IsOwner(ctx.User))
|
||||
|| (ctx.Guild != null && ((IGuildUser)ctx.User).GuildPermissions.Administrator);
|
||||
private bool AdminInGuildOrOwnerInDm() => ctx.Guild is null && _creds.IsOwner(ctx.User)
|
||||
|| ctx.Guild != null && ((IGuildUser)ctx.User).GuildPermissions.Administrator;
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
public async Task AddCustReact(string key, [Leftover] string message)
|
||||
@@ -53,7 +53,7 @@ public class CustomReactions : NadekoModule<CustomReactionsService>
|
||||
if (string.IsNullOrWhiteSpace(message) || id < 0)
|
||||
return;
|
||||
|
||||
if ((channel is null && !_creds.IsOwner(ctx.User)) || (channel != null && !((IGuildUser)ctx.User).GuildPermissions.Administrator))
|
||||
if (channel is null && !_creds.IsOwner(ctx.User) || channel != null && !((IGuildUser)ctx.User).GuildPermissions.Administrator)
|
||||
{
|
||||
await ReplyErrorLocalizedAsync(strs.insuff_perms).ConfigureAwait(false);
|
||||
return;
|
||||
|
@@ -60,7 +60,7 @@ public static class CustomReactionExtensions
|
||||
if (word.Length < str.Length && str.isValidWordDivider(word.Length))
|
||||
return WordPosition.Start;
|
||||
}
|
||||
else if ((wordIndex + word.Length) == str.Length)
|
||||
else if (wordIndex + word.Length == str.Length)
|
||||
{
|
||||
if (str.isValidWordDivider(wordIndex - 1))
|
||||
return WordPosition.End;
|
||||
|
@@ -264,7 +264,7 @@ public sealed class CustomReactionsService : IEarlyBehavior, IReadyExecutor
|
||||
if (toDelete is null)
|
||||
return null;
|
||||
|
||||
if ((toDelete.IsGlobal() && guildId is null) || (guildId == toDelete.GuildId))
|
||||
if (toDelete.IsGlobal() && guildId is null || guildId == toDelete.GuildId)
|
||||
{
|
||||
uow.CustomReactions.Remove(toDelete);
|
||||
await uow.SaveChangesAsync();
|
||||
|
Reference in New Issue
Block a user