commit
6fbd971318
6 changed files with 10 additions and 10 deletions
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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())
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<PackageIconUrl>https://cdn.discordapp.com/attachments/765441543100170271/914327948667011132/Ellie_Concept_2_transparent_ver.png</PackageIconUrl>
|
<PackageIconUrl>https://cdn.discordapp.com/attachments/765441543100170271/914327948667011132/Ellie_Concept_2_transparent_ver.png</PackageIconUrl>
|
||||||
<Description>A Discord support ticket bot built for the Ellie's home server</Description>
|
<Description>A Discord support ticket bot built for the Ellie's home server</Description>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
<Version>3.0.0.1</Version>
|
<Version>1.3.0</Version>
|
||||||
<PackageVersion>1.3.0</PackageVersion>
|
<PackageVersion>1.3.0</PackageVersion>
|
||||||
<AssemblyVersion>3.0.0.1</AssemblyVersion>
|
<AssemblyVersion>3.0.0.1</AssemblyVersion>
|
||||||
<FileVersion>3.0.0.1</FileVersion>
|
<FileVersion>3.0.0.1</FileVersion>
|
||||||
|
|
Loading…
Reference in a new issue