mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
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:
@@ -26,7 +26,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
|| (ctx.Guild is not null && ((IGuildUser)ctx.User).GuildPermissions.Administrator);
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ExprAdd(string key, [Leftover] string message)
|
||||
public async Task ExprAdd(string key, [Leftover] string message)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(message) || string.IsNullOrWhiteSpace(key))
|
||||
return;
|
||||
@@ -49,7 +49,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ExprEdit(kwum id, [Leftover] string message)
|
||||
public async Task ExprEdit(kwum id, [Leftover] string message)
|
||||
{
|
||||
var channel = ctx.Channel as ITextChannel;
|
||||
if (string.IsNullOrWhiteSpace(message) || id < 0)
|
||||
@@ -79,7 +79,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
|
||||
[Cmd]
|
||||
[Priority(1)]
|
||||
public async partial Task ExprList(int page = 1)
|
||||
public async Task ExprList(int page = 1)
|
||||
{
|
||||
if (--page < 0 || page > 999)
|
||||
return;
|
||||
@@ -114,7 +114,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ExprShow(kwum id)
|
||||
public async Task ExprShow(kwum id)
|
||||
{
|
||||
var found = _service.GetExpression(ctx.Guild?.Id, id);
|
||||
|
||||
@@ -133,7 +133,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ExprDelete(kwum id)
|
||||
public async Task ExprDelete(kwum id)
|
||||
{
|
||||
if (!AdminInGuildOrOwnerInDm())
|
||||
{
|
||||
@@ -157,7 +157,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ExprReact(kwum id, params string[] emojiStrs)
|
||||
public async Task ExprReact(kwum id, params string[] emojiStrs)
|
||||
{
|
||||
if (!AdminInGuildOrOwnerInDm())
|
||||
{
|
||||
@@ -211,24 +211,24 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public partial Task ExprCa(kwum id)
|
||||
public Task ExprCa(kwum id)
|
||||
=> InternalExprEdit(id, ExprField.ContainsAnywhere);
|
||||
|
||||
[Cmd]
|
||||
public partial Task ExprDm(kwum id)
|
||||
public Task ExprDm(kwum id)
|
||||
=> InternalExprEdit(id, ExprField.DmResponse);
|
||||
|
||||
[Cmd]
|
||||
public partial Task ExprAd(kwum id)
|
||||
public Task ExprAd(kwum id)
|
||||
=> InternalExprEdit(id, ExprField.AutoDelete);
|
||||
|
||||
[Cmd]
|
||||
public partial Task ExprAt(kwum id)
|
||||
public Task ExprAt(kwum id)
|
||||
=> InternalExprEdit(id, ExprField.AllowTarget);
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public async partial Task ExprsReload()
|
||||
public async Task ExprsReload()
|
||||
{
|
||||
await _service.TriggerReloadExpressions();
|
||||
|
||||
@@ -265,7 +265,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[UserPerm(GuildPerm.Administrator)]
|
||||
public async partial Task ExprClear()
|
||||
public async Task ExprClear()
|
||||
{
|
||||
if (await PromptUserConfirmAsync(_eb.Create()
|
||||
.WithTitle("Expression clear")
|
||||
@@ -277,7 +277,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
public async partial Task ExprsExport()
|
||||
public async Task ExprsExport()
|
||||
{
|
||||
if (!AdminInGuildOrOwnerInDm())
|
||||
{
|
||||
@@ -296,7 +296,7 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
|
||||
#if GLOBAL_NADEKO
|
||||
[OwnerOnly]
|
||||
#endif
|
||||
public async partial Task ExprsImport([Leftover] string input = null)
|
||||
public async Task ExprsImport([Leftover] string input = null)
|
||||
{
|
||||
if (!AdminInGuildOrOwnerInDm())
|
||||
{
|
||||
|
Reference in New Issue
Block a user