mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Fixed some aliases and reworked namespaces
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
using LinqToDB;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
public sealed partial class Music
|
||||
{
|
||||
public class CleanupCommands : NadekoModule
|
||||
{
|
||||
private readonly DbService _db;
|
||||
|
||||
public CleanupCommands(DbService db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
|
||||
public async Task DeletePlaylists()
|
||||
{
|
||||
await using var uow = _db.GetDbContext();
|
||||
await uow.Set<MusicPlaylist>().DeleteAsync();
|
||||
await uow.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
using NadekoBot.Modules.Music.Services;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
@@ -586,7 +586,7 @@ public sealed partial class Music : NadekoModule<IMusicService>
|
||||
if (Uri.IsWellFormedUriString(track.Url, UriKind.Absolute))
|
||||
embed.WithUrl(track.Url);
|
||||
|
||||
await ctx.Channel.EmbedAsync(embed);
|
||||
await EmbedAsync(embed);
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#nullable disable
|
||||
using LinqToDB;
|
||||
using NadekoBot.Db;
|
||||
using NadekoBot.Modules.Music.Services;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
@@ -55,7 +56,7 @@ public sealed partial class Music
|
||||
playlists.Select(r => GetText(strs.playlists(r.Id, r.Name, r.Author, r.Songs.Count)))))
|
||||
.WithOkColor();
|
||||
|
||||
await ctx.Channel.EmbedAsync(embed);
|
||||
await EmbedAsync(embed);
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
@@ -150,11 +151,11 @@ public sealed partial class Music
|
||||
await uow.SaveChangesAsync();
|
||||
}
|
||||
|
||||
await ctx.Channel.EmbedAsync(_eb.Create()
|
||||
.WithOkColor()
|
||||
.WithTitle(GetText(strs.playlist_saved))
|
||||
.AddField(GetText(strs.name), name)
|
||||
.AddField(GetText(strs.id), playlist.Id.ToString()));
|
||||
await EmbedAsync(_eb.Create()
|
||||
.WithOkColor()
|
||||
.WithTitle(GetText(strs.playlist_saved))
|
||||
.AddField(GetText(strs.name), name)
|
||||
.AddField(GetText(strs.id), playlist.Id.ToString()));
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
@@ -225,5 +226,14 @@ public sealed partial class Music
|
||||
_playlistLock.Release();
|
||||
}
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public async Task DeletePlaylists()
|
||||
{
|
||||
await using var uow = _db.GetDbContext();
|
||||
await uow.Set<MusicPlaylist>().DeleteAsync();
|
||||
await uow.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace NadekoBot.Modules.Music.Services;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using NadekoBot.Db;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace NadekoBot.Modules.Music.Services;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
using Ayu.Discord.Voice;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
@@ -1,6 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
|
||||
namespace NadekoBot.Modules.Music;
|
||||
namespace NadekoBot.Modules.Music;
|
||||
|
||||
public sealed partial class MusicQueue
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Db;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#nullable disable
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
namespace NadekoBot.Db.Models;
|
||||
|
||||
public class MusicPlaylist : DbEntity
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Nadeko.Bot.Db.Models;
|
||||
using NadekoBot.Db.Models;
|
||||
|
||||
namespace NadekoBot.Db;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#nullable disable
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
namespace NadekoBot.Db.Models;
|
||||
|
||||
public class MusicPlayerSettings
|
||||
{
|
||||
|
Reference in New Issue
Block a user