mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
@@ -172,4 +173,4 @@ public partial class Gambling
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
|
||||
@@ -180,4 +181,4 @@ public partial class Gambling
|
||||
await ctx.Message.DeleteAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
using NadekoBot.Modules.Games.Common;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
@@ -148,4 +149,4 @@ public sealed class AnimalRace : IDisposable
|
||||
_locker.Dispose();
|
||||
_users.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Games.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Games.Common;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
|
||||
@@ -24,4 +25,4 @@ public class AnimalRacingUser
|
||||
|
||||
public override int GetHashCode()
|
||||
=> this.UserId.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
|
||||
public class AlreadyJoinedException : Exception
|
||||
{
|
||||
@@ -14,4 +15,4 @@ public class AlreadyJoinedException : Exception
|
||||
public AlreadyJoinedException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
|
||||
public class AlreadyStartedException : Exception
|
||||
{
|
||||
@@ -13,4 +14,4 @@ public class AlreadyStartedException : Exception
|
||||
public AlreadyStartedException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
|
||||
public class AnimalRaceFullException : Exception
|
||||
{
|
||||
@@ -13,4 +14,4 @@ public class AnimalRaceFullException : Exception
|
||||
public AnimalRaceFullException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing.Exceptions;
|
||||
|
||||
public class NotEnoughFundsException : Exception
|
||||
{
|
||||
@@ -13,4 +14,4 @@ public class NotEnoughFundsException : Exception
|
||||
public NotEnoughFundsException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using CommandLine;
|
||||
#nullable disable
|
||||
using CommandLine;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
|
||||
@@ -12,4 +13,4 @@ public class RaceOptions : INadekoCommandOptions
|
||||
if (this.StartTime is < 10 or > 120)
|
||||
this.StartTime = 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
public class Betroll
|
||||
{
|
||||
@@ -40,4 +41,4 @@ public class Betroll
|
||||
Threshold = pair.WhenAbove,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
|
||||
public class Blackjack
|
||||
{
|
||||
@@ -339,4 +340,4 @@ public class Blackjack
|
||||
return Task.CompletedTask;
|
||||
return StateUpdated.Invoke(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
|
||||
public abstract class Player
|
||||
{
|
||||
@@ -53,4 +54,4 @@ public class User : Player
|
||||
public long Bet { get; set; }
|
||||
public IUser DiscordUser { get; }
|
||||
public bool Done => State != UserState.Waiting;
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
public class CurrencyRaffleGame
|
||||
{
|
||||
@@ -66,4 +67,4 @@ public class CurrencyRaffleGame
|
||||
var usrs = _users.ToArray();
|
||||
return usrs[rng.Next(0, usrs.Length)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
public class QuadDeck : Deck
|
||||
{
|
||||
@@ -299,4 +300,4 @@ public class Deck
|
||||
}
|
||||
return "High card " + (cards.FirstOrDefault(c => c.Number == 1)?.GetValueText() ?? cards.Max().GetValueText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using CommandLine;
|
||||
#nullable disable
|
||||
using CommandLine;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.Events;
|
||||
|
||||
@@ -25,4 +26,4 @@ public class EventOptions : INadekoCommandOptions
|
||||
if (PotSize != 0 && PotSize < Amount)
|
||||
PotSize = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Services.Database.Models;
|
||||
#nullable disable
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.Events;
|
||||
|
||||
@@ -191,4 +192,4 @@ public class GameStatusEvent : ICurrencyEvent
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
public interface ICurrencyEvent
|
||||
{
|
||||
event Func<ulong, Task> OnEnded;
|
||||
Task StopEvent();
|
||||
Task StartEvent();
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Services.Database.Models;
|
||||
#nullable disable
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.Events;
|
||||
|
||||
@@ -189,4 +190,4 @@ public class ReactionEvent : ICurrencyEvent
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Cloneable;
|
||||
#nullable disable
|
||||
using Cloneable;
|
||||
using NadekoBot.Common.Yml;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using YamlDotNet.Serialization;
|
||||
@@ -308,4 +309,4 @@ public sealed partial class BetRollPair
|
||||
{
|
||||
public int WhenAbove { get; set; }
|
||||
public float MultiplyBy { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling;
|
||||
|
||||
public enum GamblingError
|
||||
{
|
||||
None,
|
||||
NotEnough
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
@@ -57,4 +58,4 @@ public abstract class GamblingSubmodule<TService> : GamblingModule<TService>
|
||||
protected GamblingSubmodule(GamblingConfigService gamblingConfService) : base(gamblingConfService)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
public class Payout
|
||||
{
|
||||
public string User { get; set; }
|
||||
public int Amount { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
public class RollDuelGame
|
||||
{
|
||||
@@ -129,4 +130,4 @@ public struct RollDuelChallenge
|
||||
{
|
||||
public ulong Player1 { get; set; }
|
||||
public ulong Player2 { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Slot;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Slot;
|
||||
|
||||
public class SlotGame
|
||||
{
|
||||
@@ -36,4 +37,4 @@ public class SlotGame
|
||||
|
||||
return new(multi, rolls);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling;
|
||||
|
||||
public class SlotResponse
|
||||
{
|
||||
@@ -6,4 +7,4 @@ public class SlotResponse
|
||||
public long Won { get; set; }
|
||||
public List<int> Rolls { get; set; } = new();
|
||||
public GamblingError Error { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
|
||||
public enum AffinityTitle
|
||||
{
|
||||
@@ -12,4 +13,4 @@ public enum AffinityTitle
|
||||
Sloot,
|
||||
Depraved,
|
||||
Harlot
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
|
||||
public enum ClaimTitle
|
||||
{
|
||||
@@ -14,4 +15,4 @@ public enum ClaimTitle
|
||||
Incubis,
|
||||
Harem_King,
|
||||
Harem_God,
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
|
||||
public enum DivorceResult
|
||||
{
|
||||
@@ -6,4 +7,4 @@ public enum DivorceResult
|
||||
SucessWithPenalty,
|
||||
NotYourWife,
|
||||
Cooldown
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
|
||||
public enum WaifuClaimResult
|
||||
{
|
||||
Success,
|
||||
NotEnoughFunds,
|
||||
InsufficientAmount
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Common.WheelOfFortune;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Common.WheelOfFortune;
|
||||
|
||||
public class WheelOfFortuneGame
|
||||
{
|
||||
@@ -38,4 +39,4 @@ public class WheelOfFortuneGame
|
||||
Amount = amount,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using CommandLine;
|
||||
#nullable disable
|
||||
using CommandLine;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Common.Connect4;
|
||||
@@ -388,4 +389,4 @@ public sealed class Connect4Game : IDisposable
|
||||
[Option('b', "bet", Required = false, Default = 0, HelpText = "Amount you bet. Default 0.")]
|
||||
public int Bet { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Common.Connect4;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using System.Text;
|
||||
@@ -194,4 +195,4 @@ public partial class Gambling
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common.Events;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
@@ -71,4 +72,4 @@ public partial class Gambling
|
||||
potSizeStr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling;
|
||||
@@ -49,4 +50,4 @@ public partial class Gambling
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -204,4 +205,4 @@ public partial class Gambling
|
||||
return Image.Load(_images.Dice[num]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using Image = SixLabors.ImageSharp.Image;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
@@ -107,4 +108,4 @@ public partial class Gambling
|
||||
await ReplyConfirmLocalizedAsync(strs.deck_reshuffled).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using SixLabors.ImageSharp;
|
||||
@@ -116,4 +117,4 @@ public partial class Gambling
|
||||
.WithImageUrl(imageToSend.ToString())).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Db.Models;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
@@ -124,7 +125,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task Raffle([Leftover] IRole role = null)
|
||||
{
|
||||
role = role ?? ctx.Guild.EveryoneRole;
|
||||
role ??= ctx.Guild.EveryoneRole;
|
||||
|
||||
var members = (await role.GetMembersAsync().ConfigureAwait(false)).Where(u => u.Status != UserStatus.Offline);
|
||||
var membersArray = members as IUser[] ?? members.ToArray();
|
||||
@@ -140,7 +141,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task RaffleAny([Leftover] IRole role = null)
|
||||
{
|
||||
role = role ?? ctx.Guild.EveryoneRole;
|
||||
role ??= ctx.Guild.EveryoneRole;
|
||||
|
||||
var members = await role.GetMembersAsync().ConfigureAwait(false);
|
||||
var membersArray = members as IUser[] ?? members.ToArray();
|
||||
@@ -207,7 +208,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
[Priority(1)]
|
||||
public async Task Cash([Leftover] IUser user = null)
|
||||
{
|
||||
user = user ?? ctx.User;
|
||||
user ??= ctx.User;
|
||||
await ConfirmLocalizedAsync(strs.has(Format.Bold(user.ToString()), $"{GetCurrency(user.Id)}"));
|
||||
}
|
||||
|
||||
@@ -659,4 +660,4 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
|
||||
await ctx.Channel.EmbedAsync(embed).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Administration.Services;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
@@ -111,4 +112,4 @@ public partial class Gambling
|
||||
}, enabledIn.Count(), 9);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
using NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Services;
|
||||
|
||||
public class AnimalRaceService : INService
|
||||
{
|
||||
public ConcurrentDictionary<ulong, AnimalRace> AnimalRaces { get; } = new();
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
using NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common.Blackjack;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Services;
|
||||
|
||||
public class BlackJackService : INService
|
||||
{
|
||||
public ConcurrentDictionary<ulong, Blackjack> Games { get; } = new();
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common.Events;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common.Events;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
|
||||
@@ -69,4 +70,4 @@ public class CurrencyEventsService : INService
|
||||
_events.TryRemove(gid, out _);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Services;
|
||||
|
||||
@@ -77,4 +78,4 @@ public class CurrencyRaffleService : INService
|
||||
_locker.Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Common.Configs;
|
||||
#nullable disable
|
||||
using NadekoBot.Common.Configs;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling.Services;
|
||||
@@ -75,4 +76,4 @@ public sealed class GamblingConfigService : ConfigServiceBase<GamblingConfig>
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Common.Connect4;
|
||||
using NadekoBot.Modules.Gambling.Common.WheelOfFortune;
|
||||
using Newtonsoft.Json;
|
||||
@@ -157,4 +158,4 @@ WHERE CurrencyAmount > {config.Decay.MinThreshold} AND UserId!={_client.CurrentU
|
||||
|
||||
public Task<WheelOfFortuneGame.Result> WheelOfFortuneSpinAsync(ulong userId, long bet)
|
||||
=> new WheelOfFortuneGame(userId, bet, _gss.Data, _cs).SpinAsync();
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
namespace NadekoBot.Modules.Gambling.Services;
|
||||
#nullable disable
|
||||
namespace NadekoBot.Modules.Gambling.Services;
|
||||
|
||||
public interface IShopService
|
||||
{
|
||||
@@ -37,4 +38,4 @@ public interface IShopService
|
||||
/// <param name="toIndex">Destination index of the entry</param>
|
||||
/// <returns>Whether swap was successful</returns>
|
||||
Task<bool> MoveEntryAsync(ulong guildId, int fromIndex, int toIndex);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NadekoBot.Common.Collections;
|
||||
using NadekoBot.Services.Database;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
@@ -97,4 +98,4 @@ public class ShopService : IShopService, INService
|
||||
await uow.SaveChangesAsync();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
using SixLabors.Fonts;
|
||||
using SixLabors.ImageSharp;
|
||||
@@ -353,4 +354,4 @@ public class PlantPickService : INService
|
||||
});
|
||||
await uow.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
#nullable disable
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
|
||||
@@ -110,4 +111,4 @@ public class VoteRewardService : INService, IReadyExecutor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NadekoBot.Db;
|
||||
@@ -504,4 +505,4 @@ public class WaifuService : INService
|
||||
.Select(x => new WaifuItemModel(x.ItemEmoji, (int)(x.Price * conf.Waifu.Multipliers.AllGiftPrices), x.Name, x.Negative))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NadekoBot.Common.Collections;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
@@ -459,4 +460,4 @@ public partial class Gambling
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
#nullable disable
|
||||
using System.Text;
|
||||
using NadekoBot.Db.Models;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
@@ -252,4 +253,4 @@ public partial class Gambling
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Discord.Interactions;
|
||||
#nullable disable
|
||||
using Discord.Interactions;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling;
|
||||
|
||||
@@ -7,4 +8,4 @@ public class TestGamblingService : InteractionModuleBase
|
||||
[SlashCommand("test", "uwu")]
|
||||
public async Task Test(string input1, int input2)
|
||||
=> await RespondAsync("Bravo " + input1 + input2);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Gambling.Common.Waifu;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
|
||||
@@ -354,4 +355,4 @@ public partial class Gambling
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using Wof = NadekoBot.Modules.Gambling.Common.WheelOfFortune.WheelOfFortuneGame;
|
||||
#nullable disable
|
||||
using Wof = NadekoBot.Modules.Gambling.Common.WheelOfFortune.WheelOfFortuneGame;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using NadekoBot.Modules.Gambling.Common;
|
||||
using System.Collections.Immutable;
|
||||
@@ -54,4 +55,4 @@ public partial class Gambling
|
||||
『{wofMultipliers[3]}』 『{wofMultipliers[4]}』 『{wofMultipliers[5]}』")).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user