diff --git a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs index 04b2dcea..dfefc505 100644 --- a/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs +++ b/src/NadekoBot/Modules/Administration/Commands/MessageRepeater.cs @@ -12,12 +12,10 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -//todo DB namespace NadekoBot.Modules.Administration { public partial class Administration { - [Group] public class RepeatCommands { diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs index ccb62d6e..291e065b 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -//todo DB + namespace NadekoBot.Modules.Administration { public partial class Administration diff --git a/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs b/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs index 0cbc22b8..d2aa77a1 100644 --- a/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs +++ b/src/NadekoBot/Modules/ClashOfClans/ClashOfClans.cs @@ -12,7 +12,6 @@ using NadekoBot.Services.Database.Models; using System.Linq; using NadekoBot.Services.Database; -//todo DB namespace NadekoBot.Modules.ClashOfClans { [Module(",", AppendSpace = false)] diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 3632827a..73eacc19 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -12,7 +12,6 @@ using NadekoBot.Services.Database; using NadekoBot.Services.Database.Models; using System.Collections.Generic; -//todo DB namespace NadekoBot.Modules.Gambling { [Module("$", AppendSpace = false)] @@ -92,7 +91,6 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync($"{umsg.Author.Mention} successfully sent {amount} {Gambling.CurrencyPluralName}s to {receiver.Mention}!").ConfigureAwait(false); } - ////todo DB ////todo owner only //[LocalizedCommand, LocalizedDescription, LocalizedSummary] //[RequireContext(ContextType.Guild)] @@ -114,7 +112,6 @@ namespace NadekoBot.Modules.Gambling //} ////todo owner only - ////todo DB //[LocalizedCommand, LocalizedDescription, LocalizedSummary] //[RequireContext(ContextType.Guild)] //public Task Take(IUserMessage umsg, long amount, [Remainder] IGuildUser user) => @@ -184,7 +181,6 @@ namespace NadekoBot.Modules.Gambling await channel.SendMessageAsync(str).ConfigureAwait(false); } - //todo DB [LocalizedCommand, LocalizedDescription, LocalizedSummary] [RequireContext(ContextType.Guild)] public async Task Leaderboard(IUserMessage umsg) diff --git a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs index 6f1aff9d..3700813e 100644 --- a/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PlantAndPickCommands.cs @@ -12,8 +12,7 @@ //using System.Threading; //using System.Threading.Tasks; -////todo DI into partials -////todo DB +////todo rewrite //namespace NadekoBot.Modules.Games //{ // /// diff --git a/src/NadekoBot/Modules/Games/Commands/PollCommands.cs b/src/NadekoBot/Modules/Games/Commands/PollCommands.cs index 0e579ff9..e8b3711c 100644 --- a/src/NadekoBot/Modules/Games/Commands/PollCommands.cs +++ b/src/NadekoBot/Modules/Games/Commands/PollCommands.cs @@ -12,7 +12,6 @@ namespace NadekoBot.Modules.Games { public partial class GamesModule { - //todo DB in the future public static ConcurrentDictionary ActivePolls = new ConcurrentDictionary(); [LocalizedCommand, LocalizedDescription, LocalizedSummary] diff --git a/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs b/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs index a86f2558..ac20336c 100644 --- a/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs +++ b/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaGame.cs @@ -7,8 +7,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -// todo rewrite? -// todo DB +// todo rewrite namespace NadekoBot.Modules.Games.Trivia { public class TriviaGame diff --git a/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaQuestionPool.cs b/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaQuestionPool.cs index fd21086f..bb684141 100644 --- a/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaQuestionPool.cs +++ b/src/NadekoBot/Modules/Games/Commands/Trivia/TriviaQuestionPool.cs @@ -9,7 +9,6 @@ namespace NadekoBot.Modules.Games.Trivia public class TriviaQuestionPool { public static TriviaQuestionPool Instance { get; } = new TriviaQuestionPool(); - //todo DB public HashSet pool = new HashSet(); private Random rng { get; } = new Random(); @@ -30,7 +29,7 @@ namespace NadekoBot.Modules.Games.Trivia internal void Reload() { - var arr = JArray.Parse(File.ReadAllText("data/questions.json")); + var arr = JArray.Parse(File.ReadAllText("data/triviaquestions.json")); foreach (var item in arr) { diff --git a/src/NadekoBot/Modules/Games/Games.cs b/src/NadekoBot/Modules/Games/Games.cs index 4b29e7da..071ec72c 100644 --- a/src/NadekoBot/Modules/Games/Games.cs +++ b/src/NadekoBot/Modules/Games/Games.cs @@ -15,7 +15,6 @@ namespace NadekoBot.Modules.Games [Module(">", AppendSpace = false)] public partial class Games : DiscordModule { - //todo DB private IEnumerable _8BallResponses { get { using (var uow = DbHandler.UnitOfWork()) diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 2bb4d62c..09ee5a44 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -13,6 +13,7 @@ using NadekoBot.Extensions; using System.Net.Http; using Newtonsoft.Json.Linq; using System.Collections.Generic; +using NadekoBot.Services.Database; namespace NadekoBot.Modules.Music { @@ -643,8 +644,11 @@ namespace NadekoBot.Modules.Music var musicPlayer = MusicPlayers.GetOrAdd(textCh.Guild.Id, server => { - //todo DB float vol = 1;// SpecificConfigurations.Default.Of(server.Id).DefaultMusicVolume; + using (var uow = DbHandler.UnitOfWork()) + { + vol = uow.GuildConfigs.For(textCh.Guild.Id).DefaultMusicVolume; + } var mp = new MusicPlayer(voiceCh, vol); diff --git a/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs b/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs index 9f01b70f..bb24cee1 100644 --- a/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/JokeCommands.cs @@ -19,7 +19,6 @@ namespace NadekoBot.Modules.Searches [Group] public class JokeCommands { - //todo DB private List wowJokes = new List(); private List magicItems; private Logger _log; diff --git a/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs index 38e737d2..6449ceb6 100644 --- a/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/PokemonSearchCommands.cs @@ -15,7 +15,6 @@ namespace NadekoBot.Modules.Searches [Group] public class PokemonSearchCommands { - //todo DB private static Dictionary pokemons = new Dictionary(); private static Dictionary pokemonAbilities = new Dictionary(); diff --git a/src/NadekoBot/Services/Database/Models/GuildConfig.cs b/src/NadekoBot/Services/Database/Models/GuildConfig.cs index 77c1d966..a4cb10c5 100644 --- a/src/NadekoBot/Services/Database/Models/GuildConfig.cs +++ b/src/NadekoBot/Services/Database/Models/GuildConfig.cs @@ -31,5 +31,6 @@ namespace NadekoBot.Services.Database.Models //self assignable roles public bool ExclusiveSelfAssignedRoles { get; set; } public bool AutoDeleteSelfAssignedRoleMessages { get; set; } + public float DefaultMusicVolume { get; set; } } }