mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Massive cleanup
- Removed GuildConfigs repository, moved to extensions - Moved StreamSettings extension to GuildConfig extensions - namespace NadekoBot.Core has been simplified to NadekoBot in many places (more to come) - Replaced some raw delete queries with simple linqtodb queries
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using NadekoBot.Core.Common;
|
||||
using NadekoBot.Core.Modules.Music;
|
||||
using NadekoBot.Modules.Music;
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Music.Services
|
||||
|
@@ -7,10 +7,13 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
using NadekoBot.Core.Modules.Music;
|
||||
using NadekoBot.Core.Services;
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
using NadekoBot.Core.Services.Database.Repositories.Impl;
|
||||
using NadekoBot.Modules.Music;
|
||||
using NadekoBot.Services;
|
||||
using NadekoBot.Services.Database.Models;
|
||||
using NadekoBot.Services.Database.Repositories.Impl;
|
||||
using NadekoBot.Extensions;
|
||||
using Serilog;
|
||||
|
||||
|
@@ -82,7 +82,7 @@
|
||||
// {
|
||||
// using (var uow = _db.GetDbContext())
|
||||
// {
|
||||
// return uow.GuildConfigs.ForId(guildId, set => set).DefaultMusicVolume;
|
||||
// return uow._context.GuildConfigsForId(guildId, set => set).DefaultMusicVolume;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
@@ -256,7 +256,7 @@
|
||||
// bool val;
|
||||
// using (var uow = _db.GetDbContext())
|
||||
// {
|
||||
// var gc = uow.GuildConfigs.ForId(id, set => set);
|
||||
// var gc = uow._context.GuildConfigsForId(id, set => set);
|
||||
// val = gc.AutoDcFromVc = !gc.AutoDcFromVc;
|
||||
// uow.SaveChanges();
|
||||
// }
|
||||
@@ -278,7 +278,7 @@
|
||||
// {
|
||||
// using (var uow = _db.GetDbContext())
|
||||
// {
|
||||
// var ms = uow.GuildConfigs.ForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
|
||||
// var ms = uow._context.GuildConfigsForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
|
||||
// ms.MusicChannelId = cid;
|
||||
// uow.SaveChanges();
|
||||
// }
|
||||
@@ -288,7 +288,7 @@
|
||||
// {
|
||||
// using (var uow = _db.GetDbContext())
|
||||
// {
|
||||
// var ms = uow.GuildConfigs.ForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
|
||||
// var ms = uow._context.GuildConfigsForId(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
|
||||
// ms.SongAutoDelete = val;
|
||||
// uow.SaveChanges();
|
||||
// }
|
||||
|
Reference in New Issue
Block a user