sanitized mentions in quote commands

This commit is contained in:
Kwoth 2017-04-10 03:02:46 +02:00
parent 81d2272a9a
commit 4a3bb0f57e

View File

@ -34,7 +34,7 @@ namespace NadekoBot.Modules.Utility
if (quotes.Any()) if (quotes.Any())
await Context.Channel.SendConfirmAsync(GetText("quotes_page", page + 1), await Context.Channel.SendConfirmAsync(GetText("quotes_page", page + 1),
string.Join("\n", quotes.Select(q => $"`#{q.Id}` {Format.Bold(q.Keyword),-20} by {q.AuthorName}"))) string.Join("\n", quotes.Select(q => $"`#{q.Id}` {Format.Bold(q.Keyword.SanitizeMentions()),-20} by {q.AuthorName.SanitizeMentions()}")))
.ConfigureAwait(false); .ConfigureAwait(false);
else else
await ReplyErrorLocalized("quotes_page_none").ConfigureAwait(false); await ReplyErrorLocalized("quotes_page_none").ConfigureAwait(false);
@ -132,7 +132,7 @@ namespace NadekoBot.Modules.Utility
return; return;
} }
else { await Context.Channel.SendMessageAsync($"`#{qfromid.Id}` 🗯️ " + qfromid.Keyword.ToLowerInvariant() + ": " + else { await Context.Channel.SendMessageAsync($"`#{qfromid.Id}` 🗯️ " + qfromid.Keyword.ToLowerInvariant().SanitizeMentions() + ": " +
qfromid.Text.SanitizeMentions()); } qfromid.Text.SanitizeMentions()); }
} }
} }
@ -208,7 +208,7 @@ namespace NadekoBot.Modules.Utility
await uow.CompleteAsync(); await uow.CompleteAsync();
} }
await ReplyConfirmLocalized("quotes_deleted", Format.Bold(keyword)).ConfigureAwait(false); await ReplyConfirmLocalized("quotes_deleted", Format.Bold(keyword.SanitizeMentions())).ConfigureAwait(false);
} }
} }
} }