Part2 of the response system rework

This commit is contained in:
Kwoth
2024-04-29 01:13:45 +00:00
parent 4bab94b329
commit d28c7b500d
128 changed files with 2723 additions and 2289 deletions

View File

@@ -58,9 +58,9 @@ public partial class Permissions
var pageItems = items.Skip(10 * curPage).Take(10).ToList();
if (pageItems.Count == 0)
return _eb.Create().WithOkColor().WithTitle(title).WithDescription(GetText(strs.empty_page));
return new EmbedBuilder().WithOkColor().WithTitle(title).WithDescription(GetText(strs.empty_page));
return _eb.Create().WithTitle(title).WithDescription(pageItems.Join('\n')).WithOkColor();
return new EmbedBuilder().WithTitle(title).WithDescription(pageItems.Join('\n')).WithOkColor();
},
items.Length,
10);
@@ -130,13 +130,13 @@ public partial class Permissions
if (action == AddRemove.Add)
{
await ReplyConfirmLocalizedAsync(strs.blacklisted(Format.Code(type.ToString()),
Format.Code(id.ToString())));
await Response().Confirm(strs.blacklisted(Format.Code(type.ToString()),
Format.Code(id.ToString()))).SendAsync();
}
else
{
await ReplyConfirmLocalizedAsync(strs.unblacklisted(Format.Code(type.ToString()),
Format.Code(id.ToString())));
await Response().Confirm(strs.unblacklisted(Format.Code(type.ToString()),
Format.Code(id.ToString()))).SendAsync();
}
}
}