Added a lot more gifts to .gifts
This commit is contained in:
parent
3518ebc145
commit
7f5961e905
@ -10,7 +10,6 @@ using Discord;
|
||||
#if !GLOBAL_NADEKO
|
||||
namespace NadekoBot.Modules.Administration
|
||||
{
|
||||
//todo make users confirm their decision
|
||||
public partial class Administration
|
||||
{
|
||||
[Group]
|
||||
|
@ -31,7 +31,6 @@ namespace NadekoBot.Modules.Gambling
|
||||
_images = data.LocalImages;
|
||||
}
|
||||
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
public async Task Roll()
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
||||
using NadekoBot.Common;
|
||||
using NadekoBot.Common.Attributes;
|
||||
using NadekoBot.Modules.Gambling.Services;
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace NadekoBot.Modules.Gambling
|
||||
{
|
||||
@ -58,13 +59,16 @@ namespace NadekoBot.Modules.Gambling
|
||||
private readonly CurrencyService _cs;
|
||||
private readonly DbService _db;
|
||||
private readonly IDataCache _cache;
|
||||
private readonly DiscordSocketClient _client;
|
||||
|
||||
public WaifuClaimCommands(IDataCache cache, IBotConfigProvider bc, CurrencyService cs, DbService db)
|
||||
public WaifuClaimCommands(IDataCache cache, IBotConfigProvider bc,
|
||||
CurrencyService cs, DbService db, DiscordSocketClient client)
|
||||
{
|
||||
_bc = bc;
|
||||
_cs = cs;
|
||||
_db = db;
|
||||
_cache = cache;
|
||||
_client = client;
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -310,7 +314,7 @@ namespace NadekoBot.Modules.Gambling
|
||||
var now = DateTime.UtcNow;
|
||||
if (w?.Affinity?.UserId == u?.Id)
|
||||
{
|
||||
//todo don't let people change affinity on different shards
|
||||
|
||||
}
|
||||
else if (!_cache.TryAddAffinityCooldown(Context.User.Id, out remaining))
|
||||
{
|
||||
@ -473,7 +477,12 @@ namespace NadekoBot.Modules.Gambling
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[Priority(1)]
|
||||
public async Task WaifuGift()
|
||||
public async Task WaifuGift(int page = 1)
|
||||
{
|
||||
if (--page < 0 || page > 2)
|
||||
return;
|
||||
|
||||
await Context.Channel.SendPaginatedConfirmAsync(_client, page, (cur) =>
|
||||
{
|
||||
var embed = new EmbedBuilder()
|
||||
.WithTitle(GetText("waifu_gift_shop"))
|
||||
@ -482,9 +491,13 @@ namespace NadekoBot.Modules.Gambling
|
||||
Enum.GetValues(typeof(WaifuItem.ItemName))
|
||||
.Cast<WaifuItem.ItemName>()
|
||||
.Select(x => WaifuItem.GetItem(x))
|
||||
.OrderBy(x => x.Price)
|
||||
.Skip(9 * cur)
|
||||
.Take(9)
|
||||
.ForEach(x => embed.AddField(f => f.WithName(x.ItemEmoji + " " + x.Item).WithValue(x.Price).WithIsInline(true)));
|
||||
|
||||
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
|
||||
return embed;
|
||||
}, Enum.GetValues(typeof(WaifuItem.ItemName)).Length, 9);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
|
@ -22,6 +22,21 @@ namespace NadekoBot.Core.Services.Database.Models
|
||||
Violin,
|
||||
Ring,
|
||||
Helicopter,
|
||||
Iphone, //4000
|
||||
Cat, //2000
|
||||
Dog, //2001
|
||||
Lollipop, //30
|
||||
Purse, //3500
|
||||
Sushi, //300
|
||||
Icecream, //200
|
||||
Piano, //8000
|
||||
Yacht, //12000
|
||||
Car, //9000
|
||||
House, //15000
|
||||
Spaceship, //30000
|
||||
Beer, //75
|
||||
Pizza, //150
|
||||
Milk, //125
|
||||
}
|
||||
|
||||
public WaifuItem()
|
||||
@ -64,6 +79,36 @@ namespace NadekoBot.Core.Services.Database.Models
|
||||
return new WaifuItem("💍", 10000, itemName);
|
||||
case ItemName.Helicopter:
|
||||
return new WaifuItem("🚁", 20000, itemName);
|
||||
case ItemName.Iphone:
|
||||
return new WaifuItem("📱", 4000, itemName);
|
||||
case ItemName.Cat:
|
||||
return new WaifuItem("🐱", 2000, itemName);
|
||||
case ItemName.Dog:
|
||||
return new WaifuItem("🐶", 2001, itemName);
|
||||
case ItemName.Lollipop:
|
||||
return new WaifuItem("🍭", 30, itemName);
|
||||
case ItemName.Purse:
|
||||
return new WaifuItem("👛", 3500, itemName);
|
||||
case ItemName.Sushi:
|
||||
return new WaifuItem("🍣", 300, itemName);
|
||||
case ItemName.Icecream:
|
||||
return new WaifuItem("🍦", 200, itemName);
|
||||
case ItemName.Piano:
|
||||
return new WaifuItem("🎹", 8000, itemName);
|
||||
case ItemName.Yacht:
|
||||
return new WaifuItem("🛳", 12000, itemName);
|
||||
case ItemName.Car:
|
||||
return new WaifuItem("🚗", 9000, itemName);
|
||||
case ItemName.House:
|
||||
return new WaifuItem("🏠", 15000, itemName);
|
||||
case ItemName.Spaceship:
|
||||
return new WaifuItem("🚀", 30000, itemName);
|
||||
case ItemName.Beer:
|
||||
return new WaifuItem("🍺", 75, itemName);
|
||||
case ItemName.Pizza:
|
||||
return new WaifuItem("🍕", 150, itemName);
|
||||
case ItemName.Milk:
|
||||
return new WaifuItem("🥛", 125, itemName);
|
||||
default:
|
||||
throw new ArgumentException(nameof(itemName));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user