示例#1
0
            async Task TakeAsync(IUser user, ItemReward reward)
            {
                if (!(user is SocketGuildUser sgUser))
                {
                    return;
                }

                var invData = reward.ToInventoryData();

                await DB.Inventory.RemoveAsync(sgUser.Id, invData);

                await messageService.SendMessageAsync("admin-take", Settings.ChannelId.Commands, new FormatData(sgUser.Id)
                {
                    Reward = reward
                });
            }
示例#2
0
 async Task DeliverItemAsync(ulong userId, ItemReward reward)
 {
     await DB.Inventory.AddAsync(userId, reward.ToInventoryData());
 }