general inventory

master
Lan 4 years ago
parent 43966cb6cb
commit f5edaf545d
  1. 23
      Kehyeedra3/Commands/Economy.cs
  2. 2
      Kehyeedra3/Commands/Interactive.cs
  3. 2
      Kehyeedra3/Services/Models/Fishing.cs

@ -2,6 +2,7 @@
using Discord.Addons.Interactive;
using Discord.Commands;
using Kehyeedra3.Services.Models;
using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.EntityFrameworkCore.Storage;
using System;
using System.Collections.Generic;
@ -596,7 +597,7 @@ namespace Kehyeedra3.Commands
}
}
[Command("inventory"), Alias("inv", "fishinv"), Summary("Shows the fish you have currently. Variables: fish tier")]
[Command("fishinventory"), Alias("finv", "fishinv"), Summary("Shows the fish you have currently. Variables: fish tier")]
public async Task FishInventory(int? tier = null, IGuildUser user = null)
{
if (user == null)
@ -763,6 +764,26 @@ namespace Kehyeedra3.Commands
await Context.Channel.SendMessageAsync("Go fish nigger").ConfigureAwait(false);
}
}
[Command("generalinventory"),Alias("ginv", "geninv"), Summary("Shows the items you have excluding fish.")]
public async Task GeneralInventory()
{
User user;
Dictionary<Items, int[]> inv = new Dictionary<Items, int[]>();
List<User.Item> items = User.ListItems();
User.Item item;
string message = "";
using (var Database = new ApplicationDbContextFactory().CreateDbContext())
{
user = Database.Users.FirstOrDefault(x => x.Id == Context.User.Id);
inv = user.GetGenInve();
foreach (var entry in inv)
{
item = items.FirstOrDefault(x => x.Id == entry.Key);
message += $"**{item.Name}**: **{entry.Value[0]}**\n";
}
await Context.Channel.SendMessageAsync($"{Context.User.Mention}\n{message}");
}
}
[Command("tradebuy", RunMode = RunMode.Async), Summary("Unfinished command")]
public async Task TradingBuy(int amount, string itemtype, int price, [Remainder] string item)
{

@ -701,6 +701,8 @@ namespace Kehyeedra3.Commands
}
}
[RequireRolePrecondition(AccessLevel.BotOwner)]
[Command("setbf")]
public async Task SetBattleFish(byte type, IUser usar = null)

@ -69,7 +69,7 @@ namespace Kehyeedra3.Services.Models
{
Id = FishSpecies.Doomfish,
Name = "Doomfish",
Emote = "<:doomfish:651879988232060949>",
Emote = "<a:doomfish:704407234574155834>",
Rarity = FishRarity.Rare
},
new Fish()

Loading…
Cancel
Save