Currency Transactions readded. You can't gift yourself money anymore.

This commit is contained in:
Kwoth
2016-10-15 02:58:15 +02:00
parent 4001cf2e41
commit a7ac590e9d
11 changed files with 888 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ namespace NadekoBot.Modules.Gambling
public async Task Give(IUserMessage umsg, long amount, [Remainder] IGuildUser receiver)
{
var channel = (ITextChannel)umsg.Channel;
if (amount <= 0)
if (amount <= 0 || umsg.Author.Id == receiver.Id)
return;
var success = await CurrencyHandler.RemoveCurrencyAsync((IGuildUser)umsg.Author, $"Gift to {receiver.Username} ({receiver.Id}).", amount, true).ConfigureAwait(false);
if (!success)