Added .exds to complement .exas

This commit is contained in:
Kwoth
2022-09-09 21:02:16 +02:00
parent f1c7d7437a
commit 8107a80c4c
4 changed files with 35 additions and 10 deletions

View File

@@ -160,15 +160,8 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
found.Response.TrimTo(1000).Replace("](", "]\\(")));
}
[Cmd]
public async Task ExprDelete(kwum id)
public async Task ExprDeleteInternalAsync(kwum id)
{
if (!AdminInGuildOrOwnerInDm())
{
await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return;
}
var ex = await _service.DeleteAsync(ctx.Guild?.Id, id);
if (ex is not null)
@@ -186,6 +179,24 @@ public partial class NadekoExpressions : NadekoModule<NadekoExpressionsService>
}
}
[Cmd]
[UserPerm(GuildPerm.Administrator)]
[RequireContext(ContextType.Guild)]
public async Task ExprDeleteServer(kwum id)
=> await ExprDeleteInternalAsync(id);
[Cmd]
public async Task ExprDelete(kwum id)
{
if (!AdminInGuildOrOwnerInDm())
{
await ReplyErrorLocalizedAsync(strs.expr_insuff_perms);
return;
}
await ExprDeleteInternalAsync(id);
}
[Cmd]
public async Task ExprReact(kwum id, params string[] emojiStrs)
{