A few more throwaway variable syntax updated

This commit is contained in:
Kwoth
2022-02-01 13:54:25 +01:00
parent 7ee51332b0
commit b22cd5a81e
8 changed files with 12 additions and 12 deletions

View File

@@ -62,7 +62,7 @@ namespace NadekoBot.Tests
var isSuccess = true;
foreach (var methodName in methodNames)
{
if (!allAliases.TryGetValue(methodName, out var _))
if (!allAliases.TryGetValue(methodName, out _))
{
TestContext.Error.WriteLine($"{methodName} is missing an alias.");
isSuccess = false;

View File

@@ -117,7 +117,7 @@ public class AdministrationService : INService
}
else
{
DeleteMessagesOnCommandChannels.TryRemove(chId, out var _);
DeleteMessagesOnCommandChannels.TryRemove(chId, out _);
}
}

View File

@@ -507,7 +507,7 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
private bool IsRoleDeleted(ulong roleId)
{
var isDeleted = _memoryCache.TryGetValue(GetRoleDeletedKey(roleId), out var _);
var isDeleted = _memoryCache.TryGetValue(GetRoleDeletedKey(roleId), out _);
return isDeleted;
}

View File

@@ -96,7 +96,7 @@ public sealed class Connect4Game : IDisposable
{
if (_players[1] is null)
{
var __ = OnGameFailedToStart?.Invoke(this);
_ = OnGameFailedToStart?.Invoke(this);
CurrentPhase = Phase.Ended;
await _cs.AddAsync(_players[0].Value.UserId, _options.Bet, new("connect4", "refund"));
}
@@ -145,7 +145,7 @@ public sealed class Connect4Game : IDisposable
null,
TimeSpan.FromSeconds(_options.TurnTimer),
TimeSpan.FromSeconds(_options.TurnTimer));
var __ = OnGameStateUpdated?.Invoke(this);
_ = OnGameStateUpdated?.Invoke(this);
return true;
}

View File

@@ -547,7 +547,7 @@ public partial class Gambling : GamblingModule<GamblingService>
}
finally
{
_service.Duels.TryRemove((u.Id, ctx.User.Id), out var _);
_service.Duels.TryRemove((u.Id, ctx.User.Id), out _);
}
}
}

View File

@@ -86,7 +86,7 @@ public sealed class NunchiGame : IDisposable
CurrentPhase = Phase.Playing;
_= OnGameStarted?.Invoke(this);
var __ = OnRoundStarted?.Invoke(this, CurrentNumber);
_ = OnRoundStarted?.Invoke(this, CurrentNumber);
return true;
}
finally { _locker.Release(); }

View File

@@ -117,10 +117,10 @@ public class PatreonRewardsService : INService, IReadyExecutor
private bool HasPatreonCreds(IBotCredentials creds)
{
var _1 = creds.Patreon.ClientId;
var _2 = creds.Patreon.ClientSecret;
var _4 = creds.Patreon.RefreshToken;
return !(string.IsNullOrWhiteSpace(_1) || string.IsNullOrWhiteSpace(_2) || string.IsNullOrWhiteSpace(_4));
var cid = creds.Patreon.ClientId;
var cs = creds.Patreon.ClientSecret;
var rt = creds.Patreon.RefreshToken;
return !(string.IsNullOrWhiteSpace(cid) || string.IsNullOrWhiteSpace(cs) || string.IsNullOrWhiteSpace(rt));
}
public async Task RefreshPledges(IBotCredentials creds)

View File

@@ -69,7 +69,7 @@ public class Localization : ILocalization, INService
public void RemoveGuildCulture(ulong guildId)
{
if (GuildCultureInfos.TryRemove(guildId, out var _))
if (GuildCultureInfos.TryRemove(guildId, out _))
{
using var uow = _db.GetDbContext();
var gc = uow.GuildConfigsForId(guildId, set => set);