Update for Raffle Count
This commit is contained in:
parent
f4cdf5c9c6
commit
7712a2c298
@ -60,9 +60,16 @@ namespace ChaosBot.Discord.Modules
|
||||
|
||||
[Command("raffle add")]
|
||||
[RequireUserPermission(GuildPermission.ManageGuild)]
|
||||
public async Task RaffleCommandAdd(string user, int amount)
|
||||
public async Task RaffleCommandAdd(string user, int amount = 1)
|
||||
{
|
||||
await RaffleCommandHelper("add", user, amount);
|
||||
if (Program.Cfg.GetValue<int>("Raffle:Max") >= amount)
|
||||
await RaffleCommandHelper("add", user, amount);
|
||||
else
|
||||
{
|
||||
await ReplyAsync(
|
||||
$"You cannot give more then {Program.Cfg.GetValue<int>("Raffle:Max").ToString()} tickets at a time", false);
|
||||
_logger.Warn($"{Context.User.Username} attempted to give {amount} tickets to {user}!");
|
||||
}
|
||||
}
|
||||
|
||||
[Command("raffle pick")]
|
||||
@ -149,7 +156,7 @@ namespace ChaosBot.Discord.Modules
|
||||
|
||||
sb.AppendLine($"{Context.User.Mention} has added {amount} rafflepoints to <@{userId}>.");
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($"<@{userId}> now has WIP rafflepoints!");
|
||||
sb.AppendLine($"<@{userId}> now has {RaffleRepository.selectUser(userId.ToString()).Length} rafflepoints!");
|
||||
}
|
||||
|
||||
private void PickRaffle(StringBuilder sb)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user