Removed cmd source generator. Commands are no longer partial methods. Compilations should be slightly faster now. Updated packages and adapted drawing code to the new apis. There may be some bugs.

This commit is contained in:
Kwoth
2022-07-18 04:33:50 +02:00
parent 3db194c186
commit 99c60459f8
98 changed files with 747 additions and 788 deletions

View File

@@ -37,7 +37,7 @@ public sealed partial class Music
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task Playlists([Leftover] int num = 1)
public async Task Playlists([Leftover] int num = 1)
{
if (num <= 0)
return;
@@ -60,7 +60,7 @@ public sealed partial class Music
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task DeletePlaylist([Leftover] int id)
public async Task DeletePlaylist([Leftover] int id)
{
var success = false;
try
@@ -91,7 +91,7 @@ public sealed partial class Music
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task PlaylistShow(int id, int page = 1)
public async Task PlaylistShow(int id, int page = 1)
{
if (page-- < 1)
return;
@@ -118,7 +118,7 @@ public sealed partial class Music
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task Save([Leftover] string name)
public async Task Save([Leftover] string name)
{
if (!_service.TryGetMusicPlayer(ctx.Guild.Id, out var mp))
{
@@ -159,7 +159,7 @@ public sealed partial class Music
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task Load([Leftover] int id)
public async Task Load([Leftover] int id)
{
// expensive action, 1 at a time
await _playlistLock.WaitAsync();