fixed spam while playing $br
This commit is contained in:
parent
89de5e519b
commit
b9d60d9c0e
@ -26,7 +26,7 @@ namespace NadekoBot.Classes
|
||||
await u.SendMessage("👑Congratulations!👑\nYou received: " + flows).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static async Task<bool> RemoveFlowers(Discord.User u, string reason, int amount)
|
||||
public static async Task<bool> RemoveFlowers(Discord.User u, string reason, int amount, bool silent=false, string message="👎`Bot owner has taken {0}{1} from you.`")
|
||||
{
|
||||
if (amount <= 0)
|
||||
return false;
|
||||
@ -43,7 +43,10 @@ namespace NadekoBot.Classes
|
||||
Value = -amount,
|
||||
});
|
||||
|
||||
await u.SendMessage($"👎`Bot owner has taken:{amount}{NadekoBot.Config.CurrencySign} from you.`").ConfigureAwait(false);
|
||||
if (silent)
|
||||
return true;
|
||||
|
||||
await u.SendMessage(string.Format(message,amount,NadekoBot.Config.CurrencySign)).ConfigureAwait(false);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
return;
|
||||
}
|
||||
|
||||
await FlowersHandler.RemoveFlowers(e.User, "Betroll Gamble", (int)amount);
|
||||
await FlowersHandler.RemoveFlowers(e.User, "Betroll Gamble", (int)amount, true);
|
||||
|
||||
var rng = new Random().Next(0, 101);
|
||||
var str = $"{e.User.Mention} `You rolled {rng}.` ";
|
||||
|
Loading…
Reference in New Issue
Block a user