restored some lost work
This commit is contained in:
@ -16,6 +16,7 @@ using NadekoBot.Modules.Music.Common.Exceptions;
|
||||
using NadekoBot.Modules.Music.Common.SongResolver;
|
||||
using NadekoBot.Common.Collections;
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace NadekoBot.Modules.Music.Services
|
||||
{
|
||||
@ -276,5 +277,25 @@ namespace NadekoBot.Modules.Music.Services
|
||||
{
|
||||
_musicSettings.AddOrUpdate(id, musicSettings, delegate { return musicSettings; });
|
||||
}
|
||||
|
||||
public void SetMusicChannel(ulong guildId, ulong? cid)
|
||||
{
|
||||
using (var uow = _db.UnitOfWork)
|
||||
{
|
||||
var ms = uow.GuildConfigs.For(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
|
||||
ms.MusicChannelId = cid;
|
||||
uow.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSongAutoDelete(ulong guildId, bool val)
|
||||
{
|
||||
using (var uow = _db.UnitOfWork)
|
||||
{
|
||||
var ms = uow.GuildConfigs.For(guildId, set => set.Include(x => x.MusicSettings)).MusicSettings;
|
||||
ms.SongAutoDelete = val;
|
||||
uow.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user