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

@@ -23,12 +23,12 @@ public partial class Utility
[Cmd]
[OwnerOnly]
public partial Task ServerInfo([Leftover] string guildName)
public Task ServerInfo([Leftover] string guildName)
=> InternalServerInfo(guildName);
[Cmd]
[RequireContext(ContextType.Guild)]
public partial Task ServerInfo()
public Task ServerInfo()
=> InternalServerInfo();
private async Task InternalServerInfo(string guildName = null)
@@ -81,7 +81,7 @@ public partial class Utility
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task ChannelInfo(ITextChannel channel = null)
public async Task ChannelInfo(ITextChannel channel = null)
{
var ch = channel ?? (ITextChannel)ctx.Channel;
if (ch is null)
@@ -100,7 +100,7 @@ public partial class Utility
[Cmd]
[RequireContext(ContextType.Guild)]
public async partial Task UserInfo(IGuildUser usr = null)
public async Task UserInfo(IGuildUser usr = null)
{
var user = usr ?? ctx.User as IGuildUser;
@@ -143,7 +143,7 @@ public partial class Utility
[Cmd]
[RequireContext(ContextType.Guild)]
[OwnerOnly]
public async partial Task Activity(int page = 1)
public async Task Activity(int page = 1)
{
const int activityPerPage = 10;
page -= 1;