mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-03 00:04:28 -05:00
A few more throwaway variable syntax updated
This commit is contained in:
@@ -62,7 +62,7 @@ namespace NadekoBot.Tests
|
|||||||
var isSuccess = true;
|
var isSuccess = true;
|
||||||
foreach (var methodName in methodNames)
|
foreach (var methodName in methodNames)
|
||||||
{
|
{
|
||||||
if (!allAliases.TryGetValue(methodName, out var _))
|
if (!allAliases.TryGetValue(methodName, out _))
|
||||||
{
|
{
|
||||||
TestContext.Error.WriteLine($"{methodName} is missing an alias.");
|
TestContext.Error.WriteLine($"{methodName} is missing an alias.");
|
||||||
isSuccess = false;
|
isSuccess = false;
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class AdministrationService : INService
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DeleteMessagesOnCommandChannels.TryRemove(chId, out var _);
|
DeleteMessagesOnCommandChannels.TryRemove(chId, out _);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
|
|
||||||
private bool IsRoleDeleted(ulong roleId)
|
private bool IsRoleDeleted(ulong roleId)
|
||||||
{
|
{
|
||||||
var isDeleted = _memoryCache.TryGetValue(GetRoleDeletedKey(roleId), out var _);
|
var isDeleted = _memoryCache.TryGetValue(GetRoleDeletedKey(roleId), out _);
|
||||||
return isDeleted;
|
return isDeleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public sealed class Connect4Game : IDisposable
|
|||||||
{
|
{
|
||||||
if (_players[1] is null)
|
if (_players[1] is null)
|
||||||
{
|
{
|
||||||
var __ = OnGameFailedToStart?.Invoke(this);
|
_ = OnGameFailedToStart?.Invoke(this);
|
||||||
CurrentPhase = Phase.Ended;
|
CurrentPhase = Phase.Ended;
|
||||||
await _cs.AddAsync(_players[0].Value.UserId, _options.Bet, new("connect4", "refund"));
|
await _cs.AddAsync(_players[0].Value.UserId, _options.Bet, new("connect4", "refund"));
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ public sealed class Connect4Game : IDisposable
|
|||||||
null,
|
null,
|
||||||
TimeSpan.FromSeconds(_options.TurnTimer),
|
TimeSpan.FromSeconds(_options.TurnTimer),
|
||||||
TimeSpan.FromSeconds(_options.TurnTimer));
|
TimeSpan.FromSeconds(_options.TurnTimer));
|
||||||
var __ = OnGameStateUpdated?.Invoke(this);
|
_ = OnGameStateUpdated?.Invoke(this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_service.Duels.TryRemove((u.Id, ctx.User.Id), out var _);
|
_service.Duels.TryRemove((u.Id, ctx.User.Id), out _);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public sealed class NunchiGame : IDisposable
|
|||||||
|
|
||||||
CurrentPhase = Phase.Playing;
|
CurrentPhase = Phase.Playing;
|
||||||
_= OnGameStarted?.Invoke(this);
|
_= OnGameStarted?.Invoke(this);
|
||||||
var __ = OnRoundStarted?.Invoke(this, CurrentNumber);
|
_ = OnRoundStarted?.Invoke(this, CurrentNumber);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
finally { _locker.Release(); }
|
finally { _locker.Release(); }
|
||||||
|
|||||||
@@ -117,10 +117,10 @@ public class PatreonRewardsService : INService, IReadyExecutor
|
|||||||
|
|
||||||
private bool HasPatreonCreds(IBotCredentials creds)
|
private bool HasPatreonCreds(IBotCredentials creds)
|
||||||
{
|
{
|
||||||
var _1 = creds.Patreon.ClientId;
|
var cid = creds.Patreon.ClientId;
|
||||||
var _2 = creds.Patreon.ClientSecret;
|
var cs = creds.Patreon.ClientSecret;
|
||||||
var _4 = creds.Patreon.RefreshToken;
|
var rt = creds.Patreon.RefreshToken;
|
||||||
return !(string.IsNullOrWhiteSpace(_1) || string.IsNullOrWhiteSpace(_2) || string.IsNullOrWhiteSpace(_4));
|
return !(string.IsNullOrWhiteSpace(cid) || string.IsNullOrWhiteSpace(cs) || string.IsNullOrWhiteSpace(rt));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RefreshPledges(IBotCredentials creds)
|
public async Task RefreshPledges(IBotCredentials creds)
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class Localization : ILocalization, INService
|
|||||||
|
|
||||||
public void RemoveGuildCulture(ulong guildId)
|
public void RemoveGuildCulture(ulong guildId)
|
||||||
{
|
{
|
||||||
if (GuildCultureInfos.TryRemove(guildId, out var _))
|
if (GuildCultureInfos.TryRemove(guildId, out _))
|
||||||
{
|
{
|
||||||
using var uow = _db.GetDbContext();
|
using var uow = _db.GetDbContext();
|
||||||
var gc = uow.GuildConfigsForId(guildId, set => set);
|
var gc = uow.GuildConfigsForId(guildId, set => set);
|
||||||
|
|||||||
Reference in New Issue
Block a user