diff --git a/ChaosBot/Discord/Modules/RaffleSystem.cs b/ChaosBot/Discord/Modules/RaffleSystem.cs index c954d1d..07ad48e 100644 --- a/ChaosBot/Discord/Modules/RaffleSystem.cs +++ b/ChaosBot/Discord/Modules/RaffleSystem.cs @@ -120,10 +120,10 @@ namespace ChaosBot.Discord.Modules [Command("raffle buy")] public async Task RaffleCommandBuy(int amount = 1) { - int cost = ConfigurationRepository.GetValue($"Raffle:Cost", Context.Guild.Id) * amount; + int cost = Convert.ToInt32(ConfigurationRepository.GetValue($"Raffle:Cost", Context.Guild.Id)) * amount; long curPoints = PointsRepository.Total(Convert.ToInt64(Context.User.Id), Convert.ToInt64(Context.Guild.Id)); int curRaffle = RaffleRepository.Count(Convert.ToInt64(Context.User.Id), Convert.ToInt64(Context.Guild.Id)); - int maxRaffle = ConfigurationRepository.GetValue($"Raffle:Max", Context.Guild.Id); + int maxRaffle = Convert.ToInt32(ConfigurationRepository.GetValue($"Raffle:Max", Context.Guild.Id)); int newRaffle = curRaffle + amount; Console.WriteLine($"curPoints: {curPoints}, curRaffle: {curRaffle}, maxRaffle: {maxRaffle}, newRaffle: {newRaffle}"); @@ -147,7 +147,7 @@ namespace ChaosBot.Discord.Modules else { await ReplyAsync( - $"You cannot buy more then {ConfigurationRepository.GetValue($"Raffle:Max", Context.Guild.Id).ToString()} tickets.", false); + $"You cannot buy more then {ConfigurationRepository.GetValue($"Raffle:Max", Context.Guild.Id)} tickets.", false); _logger.Warn($"{Context.User.Username} has bought {amount} tickets!"); } }