Finished new response system

This commit is contained in:
Kwoth
2024-05-02 06:47:01 +00:00
parent a25adefc65
commit fc4858830c
102 changed files with 1811 additions and 1818 deletions

View File

@@ -20,7 +20,7 @@ public partial class Utility
if (setting is null)
{
var configNames = _settingServices.Select(x => x.Name);
var embed = new EmbedBuilder()
var embed = _sender.CreateEmbed()
.WithErrorColor()
.WithDescription(GetText(strs.config_not_found(Format.Code(name))))
.AddField(GetText(strs.config_list), string.Join("\n", configNames));
@@ -43,7 +43,7 @@ public partial class Utility
name = name?.ToLowerInvariant();
if (string.IsNullOrWhiteSpace(name))
{
var embed = new EmbedBuilder()
var embed = _sender.CreateEmbed()
.WithOkColor()
.WithTitle(GetText(strs.config_list))
.WithDescription(string.Join("\n", configNames));
@@ -58,7 +58,7 @@ public partial class Utility
// if config name is not found, print error and the list of configs
if (setting is null)
{
var embed = new EmbedBuilder()
var embed = _sender.CreateEmbed()
.WithErrorColor()
.WithDescription(GetText(strs.config_not_found(Format.Code(name))))
.AddField(GetText(strs.config_list), string.Join("\n", configNames));
@@ -75,7 +75,7 @@ public partial class Utility
if (string.IsNullOrWhiteSpace(prop))
{
var propStrings = GetPropsAndValuesString(setting, propNames);
var embed = new EmbedBuilder().WithOkColor().WithTitle($"⚙️ {setting.Name}").WithDescription(propStrings);
var embed = _sender.CreateEmbed().WithOkColor().WithTitle($"⚙️ {setting.Name}").WithDescription(propStrings);
await Response().Embed(embed).SendAsync();
@@ -88,7 +88,7 @@ public partial class Utility
if (!exists)
{
var propStrings = GetPropsAndValuesString(setting, propNames);
var propErrorEmbed = new EmbedBuilder()
var propErrorEmbed = _sender.CreateEmbed()
.WithErrorColor()
.WithDescription(GetText(
strs.config_prop_not_found(Format.Code(prop), Format.Code(name))))
@@ -110,7 +110,7 @@ public partial class Utility
if (prop != "currency.sign")
value = Format.Code(Format.Sanitize(value.TrimTo(1000)), "json");
var embed = new EmbedBuilder()
var embed = _sender.CreateEmbed()
.WithOkColor()
.AddField("Config", Format.Code(setting.Name), true)
.AddField("Prop", Format.Code(prop), true)