mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Some refactorings - Updated editorconfig, removed some unused variables and parameters, updated some old thorwaway variable code, some general cleanup
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user