Some refactorings - Updated editorconfig, removed some unused variables and parameters, updated some old thorwaway variable code, some general cleanup

This commit is contained in:
Kwoth
2022-02-01 13:51:07 +01:00
parent d31cfcc5a8
commit 7ee51332b0
20 changed files with 64 additions and 201 deletions

View File

@@ -48,15 +48,6 @@ public class GirlRating
var imgStream = new MemoryStream();
img.SaveAsPng(imgStream);
return imgStream;
//using (var byteContent = new ByteArrayContent(imgStream.ToArray()))
//{
// http.AddFakeHeaders();
// using (var reponse = await http.PutAsync("https://transfer.sh/img.png", byteContent))
// {
// url = await reponse.Content.ReadAsStringAsync();
// }
//}
}
catch (Exception ex)
{

View File

@@ -154,21 +154,21 @@ public sealed class NunchiGame : IDisposable
if (failure is not null)
participants.Remove(failure.Value); // remove the dude who failed from the list of players
var __ = OnRoundEnded?.Invoke(this, failure);
_ = OnRoundEnded?.Invoke(this, failure);
if (participants.Count <= 1) // means we have a winner or everyone was booted out
{
killTimer.Change(Timeout.Infinite, Timeout.Infinite);
CurrentPhase = Phase.Ended;
_= OnGameEnded?.Invoke(this, participants.Count > 0 ? participants.First().Name : null);
_ = OnGameEnded?.Invoke(this, participants.Count > 0 ? participants.First().Name : null);
return;
}
CurrentPhase = Phase.WaitingForNextRound;
var throwawayDelay = Task.Run(async () =>
Task.Run(async () =>
{
await Task.Delay(NEXT_ROUND_TIMEOUT);
CurrentPhase = Phase.Playing;
var ___ = OnRoundStarted?.Invoke(this, CurrentNumber);
_ = OnRoundStarted?.Invoke(this, CurrentNumber);
});
}

View File

@@ -59,8 +59,6 @@ public partial class Games
[RequireContext(ContextType.Guild)]
public async partial Task Pollend()
{
var channel = (ITextChannel)ctx.Channel;
Poll p;
if ((p = _service.StopPoll(ctx.Guild.Id)) is null)
return;