From 5958580abe6a503ebc326399530736b398b3764a Mon Sep 17 00:00:00 2001 From: Pg Date: Sat, 26 Nov 2016 01:52:27 +0100 Subject: [PATCH] Update file in database models --- .../Models => Modules/Pokemon}/PokeStats.cs | 0 .../Modules/Pokemon/PokemonModule.cs | 42 +++++++++++++++---- 2 files changed, 33 insertions(+), 9 deletions(-) rename src/NadekoBot/{Services/Database/Models => Modules/Pokemon}/PokeStats.cs (100%) diff --git a/src/NadekoBot/Services/Database/Models/PokeStats.cs b/src/NadekoBot/Modules/Pokemon/PokeStats.cs similarity index 100% rename from src/NadekoBot/Services/Database/Models/PokeStats.cs rename to src/NadekoBot/Modules/Pokemon/PokeStats.cs diff --git a/src/NadekoBot/Modules/Pokemon/PokemonModule.cs b/src/NadekoBot/Modules/Pokemon/PokemonModule.cs index d494fffa..fe13d795 100644 --- a/src/NadekoBot/Modules/Pokemon/PokemonModule.cs +++ b/src/NadekoBot/Modules/Pokemon/PokemonModule.cs @@ -1,18 +1,42 @@ +using Discord; using Discord.Commands; -using Discord.Modules; -using NadekoBot.Classes; -using NadekoBot.Classes.JSONModels; -using NadekoBot.DataModels; +using NadekoBot.Attributes; using NadekoBot.Extensions; -using NadekoBot.Modules.Permissions.Classes; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.Linq; +using System.Text; +using System.Threading.Tasks; +using NadekoBot.Services; +using Discord.WebSocket; +using NadekoBot.Services.Database.Models; +using System.Collections.Generic; +using System.Collections.Concurrent; +using System.Linq; + namespace NadekoBot.Modules.Pokemon { - class PokemonModule : DiscordModule + + [NadekoModule("PokeGame", ">")] + public partial class PokemonModule : DiscordModule + { + public static string CurrencyName { get; set; } + public static string CurrencyPluralName { get; set; } + public static string CurrencySign { get; set; } + + public Gambling(ILocalization loc, CommandService cmds, ShardedDiscordClient client) : base(loc, cmds, client) + { + using (var uow = DbHandler.UnitOfWork()) + { + var conf = uow.BotConfig.GetOrCreate(); + + CurrencyName = conf.CurrencyName; + CurrencySign = conf.CurrencySign; + CurrencyPluralName = conf.CurrencyPluralName; + } + } + + + class PokemonModule : DiscordModule { public override string Prefix { get; } = NadekoBot.Config.CommandPrefixes.Pokemon;