Updated some more files

This commit is contained in:
EmotionChild 2022-08-21 20:43:28 +12:00
parent 2187fdc8fc
commit 1d9ca5d004
No known key found for this signature in database
GPG key ID: C0FA13E96E2C16CA
5 changed files with 9 additions and 9 deletions

View file

@ -33,7 +33,7 @@ public class CloseCommand : ApplicationCommandModule
Color = DiscordColor.Cyan, Color = DiscordColor.Cyan,
Description = "Are you sure you wish to close this ticket? You cannot re-open it again later." Description = "Are you sure you wish to close this ticket? You cannot re-open it again later."
}) })
.AddComponents(new DiscordButtonComponent(ButtonStyle.Danger, "supportboi_closeconfirm", "Confirm")); .AddComponents(new DiscordButtonComponent(ButtonStyle.Danger, "supportchild_closeconfirm", "Confirm"));
await command.CreateResponseAsync(confirmation); await command.CreateResponseAsync(confirmation);

View file

@ -36,7 +36,7 @@ public class CreateButtonPanelCommand : ApplicationCommandModule
for (; nrOfButtons < 5 * (nrOfButtonRows + 1) && nrOfButtons < verifiedCategories.Count; nrOfButtons++) for (; nrOfButtons < 5 * (nrOfButtonRows + 1) && nrOfButtons < verifiedCategories.Count; nrOfButtons++)
{ {
buttonRow.Add(new DiscordButtonComponent(ButtonStyle.Primary, "supportboi_newticketbutton " + verifiedCategories[nrOfButtons].id, verifiedCategories[nrOfButtons].name)); buttonRow.Add(new DiscordButtonComponent(ButtonStyle.Primary, "supportchild_newticketbutton " + verifiedCategories[nrOfButtons].id, verifiedCategories[nrOfButtons].name));
} }
builder.AddComponents(buttonRow); builder.AddComponents(buttonRow);
} }
@ -53,9 +53,9 @@ public class CreateButtonPanelCommand : ApplicationCommandModule
{ {
await interaction.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource, new DiscordInteractionResponseBuilder().AsEphemeral()); await interaction.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource, new DiscordInteractionResponseBuilder().AsEphemeral());
if (!ulong.TryParse(interaction.Data.CustomId.Replace("supportboi_newticketbutton ", ""), out ulong categoryID) || categoryID == 0) if (!ulong.TryParse(interaction.Data.CustomId.Replace("supportchild_newticketbutton ", ""), out ulong categoryID) || categoryID == 0)
{ {
Logger.Warn("Invalid ID: " + interaction.Data.CustomId.Replace("supportboi_newticketbutton ", "")); Logger.Warn("Invalid ID: " + interaction.Data.CustomId.Replace("supportchild_newticketbutton ", ""));
return; return;
} }

View file

@ -43,7 +43,7 @@ public class CreateSelectionBoxPanelCommand : ApplicationCommandModule
{ {
categoryOptions.Add(new DiscordSelectComponentOption(verifiedCategories[selectionOptions].name, verifiedCategories[selectionOptions].id.ToString())); categoryOptions.Add(new DiscordSelectComponentOption(verifiedCategories[selectionOptions].name, verifiedCategories[selectionOptions].id.ToString()));
} }
selectionComponents.Add(new DiscordSelectComponent("supportboi_newticketselector" + selectionBoxes, placeholder, categoryOptions, false, 0, 1)); selectionComponents.Add(new DiscordSelectComponent("supportchild_newticketselector" + selectionBoxes, placeholder, categoryOptions, false, 0, 1));
} }
return selectionComponents; return selectionComponents;

View file

@ -70,7 +70,7 @@ public class NewCommand : ApplicationCommandModule
for (; nrOfButtons < 5 * (nrOfButtonRows + 1) && nrOfButtons < verifiedCategories.Count; nrOfButtons++) for (; nrOfButtons < 5 * (nrOfButtonRows + 1) && nrOfButtons < verifiedCategories.Count; nrOfButtons++)
{ {
buttonRow.Add(new DiscordButtonComponent(ButtonStyle.Primary, "supportboi_newcommandbutton " + verifiedCategories[nrOfButtons].id, verifiedCategories[nrOfButtons].name)); buttonRow.Add(new DiscordButtonComponent(ButtonStyle.Primary, "supportchild_newcommandbutton " + verifiedCategories[nrOfButtons].id, verifiedCategories[nrOfButtons].name));
} }
builder.AddComponents(buttonRow); builder.AddComponents(buttonRow);
} }
@ -91,7 +91,7 @@ public class NewCommand : ApplicationCommandModule
{ {
categoryOptions.Add(new DiscordSelectComponentOption(verifiedCategories[selectionOptions].name, verifiedCategories[selectionOptions].id.ToString())); categoryOptions.Add(new DiscordSelectComponentOption(verifiedCategories[selectionOptions].name, verifiedCategories[selectionOptions].id.ToString()));
} }
selectionComponents.Add(new DiscordSelectComponent("supportboi_newcommandselector" + selectionBoxes, "Open new ticket...", categoryOptions, false, 0, 1)); selectionComponents.Add(new DiscordSelectComponent("supportchild_newcommandselector" + selectionBoxes, "Open new ticket...", categoryOptions, false, 0, 1));
} }
await command.CreateResponseAsync(new DiscordInteractionResponseBuilder().AddComponents(selectionComponents).AsEphemeral()); await command.CreateResponseAsync(new DiscordInteractionResponseBuilder().AddComponents(selectionComponents).AsEphemeral());
@ -103,7 +103,7 @@ public class NewCommand : ApplicationCommandModule
switch (interaction.Data.ComponentType) switch (interaction.Data.ComponentType)
{ {
case ComponentType.Button: case ComponentType.Button:
stringID = interaction.Data.CustomId.Replace("supportboi_newcommandbutton ", ""); stringID = interaction.Data.CustomId.Replace("supportchild_newcommandbutton ", "");
break; break;
case ComponentType.Select: case ComponentType.Select:
if (interaction.Data.Values == null || interaction.Data.Values.Length <= 0) return; if (interaction.Data.Values == null || interaction.Data.Values.Length <= 0) return;

View file

@ -15,7 +15,7 @@ public class StatusCommand : ApplicationCommandModule
long closedTickets = Database.GetNumberOfClosedTickets(); long closedTickets = Database.GetNumberOfClosedTickets();
DiscordEmbed botInfo = new DiscordEmbedBuilder() DiscordEmbed botInfo = new DiscordEmbedBuilder()
.WithAuthor("KarlofDuty/SupportBoi @ GitHub", "https://github.com/EmotionChild/SupportChild", "https://cdn.discordapp.com/attachments/765441543100170271/914327948667011132/Ellie_Concept_2_transparent_ver.png") .WithAuthor("KarlofDuty/supportchild @ GitHub", "https://github.com/EmotionChild/SupportChild", "https://cdn.discordapp.com/attachments/765441543100170271/914327948667011132/Ellie_Concept_2_transparent_ver.png")
.WithTitle("Bot information") .WithTitle("Bot information")
.WithColor(DiscordColor.Cyan) .WithColor(DiscordColor.Cyan)
.AddField("Version:", SupportChild.GetVersion()) .AddField("Version:", SupportChild.GetVersion())