Fixed some aliases and reworked namespaces

This commit is contained in:
Kwoth
2024-04-27 16:03:48 +00:00
parent e0819f760c
commit 812b865add
344 changed files with 3166 additions and 3314 deletions

View File

@@ -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();
}
}
}

View File

@@ -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]

View File

@@ -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();
}
}
}

View File

@@ -1,4 +1,4 @@
using Nadeko.Bot.Db.Models;
using NadekoBot.Db.Models;
using System.Diagnostics.CodeAnalysis;
namespace NadekoBot.Modules.Music.Services;

View File

@@ -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;

View File

@@ -1,4 +1,4 @@
using Nadeko.Bot.Db.Models;
using NadekoBot.Db.Models;
namespace NadekoBot.Modules.Music;

View File

@@ -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;

View File

@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore.ChangeTracking;
namespace NadekoBot.Modules.Music;
namespace NadekoBot.Modules.Music;
public sealed partial class MusicQueue
{

View File

@@ -1,6 +1,6 @@
#nullable disable
using Microsoft.EntityFrameworkCore;
using Nadeko.Bot.Db.Models;
using NadekoBot.Db.Models;
namespace NadekoBot.Db;

View File

@@ -1,5 +1,5 @@
#nullable disable
namespace Nadeko.Bot.Db.Models;
namespace NadekoBot.Db.Models;
public class MusicPlaylist : DbEntity
{

View File

@@ -1,6 +1,6 @@
#nullable disable
using Microsoft.EntityFrameworkCore;
using Nadeko.Bot.Db.Models;
using NadekoBot.Db.Models;
namespace NadekoBot.Db;

View File

@@ -1,5 +1,5 @@
#nullable disable
namespace Nadeko.Bot.Db.Models;
namespace NadekoBot.Db.Models;
public class MusicPlayerSettings
{