mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Merge branch 'qdel-patch' into 'v3'
Clarity on qdel See merge request Kwoth/nadekobot!197
This commit is contained in:
@@ -208,7 +208,7 @@ namespace NadekoBot.Modules.Utility
|
|||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
public async Task QuoteDelete(int id)
|
public async Task QuoteDelete(int id)
|
||||||
{
|
{
|
||||||
var isAdmin = ((IGuildUser)ctx.Message.Author).GuildPermissions.ManageMessages;
|
var hasManageMessages = ((IGuildUser)ctx.Message.Author).GuildPermissions.ManageMessages;
|
||||||
|
|
||||||
var success = false;
|
var success = false;
|
||||||
string response;
|
string response;
|
||||||
@@ -216,7 +216,7 @@ namespace NadekoBot.Modules.Utility
|
|||||||
{
|
{
|
||||||
var q = uow.Quotes.GetById(id);
|
var q = uow.Quotes.GetById(id);
|
||||||
|
|
||||||
if ((q?.GuildId != ctx.Guild.Id) || (!isAdmin && q.AuthorId != ctx.Message.Author.Id))
|
if ((q?.GuildId != ctx.Guild.Id) || (!hasManageMessages && q.AuthorId != ctx.Message.Author.Id))
|
||||||
{
|
{
|
||||||
response = GetText(strs.quotes_remove_none);
|
response = GetText(strs.quotes_remove_none);
|
||||||
}
|
}
|
||||||
|
@@ -611,7 +611,7 @@ quoteid:
|
|||||||
args:
|
args:
|
||||||
- "123456"
|
- "123456"
|
||||||
quotedelete:
|
quotedelete:
|
||||||
desc: "Deletes a quote with the specified ID. You have to be either server Administrator or the creator of the quote to delete it."
|
desc: "Deletes a quote with the specified ID. You have to either have the Manage Messages permission or be the creator of the quote to delete it."
|
||||||
args:
|
args:
|
||||||
- "123456"
|
- "123456"
|
||||||
draw:
|
draw:
|
||||||
|
Reference in New Issue
Block a user