feat(docs+bot): add info on system recovery to new system embed, pk;help, and faq

This commit is contained in:
rladenson 2024-10-04 15:15:17 -06:00 committed by violet
parent 5f644ab17a
commit f6eda1834f
3 changed files with 50 additions and 8 deletions

View file

@ -17,6 +17,26 @@ public class Help
private static Dictionary<string, Embed.Field[]> helpEmbedPages = new Dictionary<string, Embed.Field[]>
{
{
"default",
new Embed.Field[]
{
new
(
"System Recovery",
"In the case of your Discord account getting lost or deleted, the PluralKit staff can help you recover your system. "
+ "In order to do so, we will need your **PluralKit token**. This is the *only* way you can prove ownership so we can help you recover your system. "
+ "To get it, run `pk;token` and then store it in a safe place.\n\n"
+ "Keep your token safe, if other people get access to it they can also use it to access your system. "
+ "If your token is ever compromised run `pk;token refresh` to invalidate the old token and get a new one."
),
new
(
"Use the buttons below to see more info!",
""
)
}
},
{
"basicinfo",
new Embed.Field[]
@ -31,7 +51,7 @@ public class Help
(
"Why are people's names saying [APP] or [BOT] next to them?",
"These people are not actually apps or bots, this is just a Discord limitation. See [the documentation](https://pluralkit.me/guide#proxying) for an in-depth explanation."
),
)
}
},
{
@ -137,7 +157,8 @@ public class Help
public Task HelpRoot(Context ctx)
=> ctx.Rest.CreateMessage(ctx.Channel.Id, new MessageRequest
{
Embeds = new[] { helpEmbed with { Description = helpEmbed.Description + "\n\n**Use the buttons below to see more info!**" } },
Embeds = new[] { helpEmbed with { Description = helpEmbed.Description,
Fields = helpEmbedPages.GetValueOrDefault("default") } },
Components = new[] { helpPageButtons(ctx.Author.Id) },
});
@ -151,7 +172,7 @@ public class Help
if (ctx.Event.Message.Components.First().Components.Where(x => x.CustomId == ctx.CustomId).First().Style == ButtonStyle.Primary)
return ctx.Respond(InteractionResponse.ResponseType.UpdateMessage, new()
{
Embeds = new[] { helpEmbed with { Description = helpEmbed.Description + "\n\n**Use the buttons below to see more info!**" } },
Embeds = new[] { helpEmbed with { Fields = helpEmbedPages.GetValueOrDefault("default") } },
Components = new[] { buttons }
});

View file

@ -2,6 +2,9 @@ using PluralKit.Core;
namespace PluralKit.Bot;
using Myriad.Builders;
using Myriad.Types;
public class System
{
private readonly EmbedService _embeds;
@ -29,9 +32,21 @@ public class System
var system = await ctx.Repository.CreateSystem(systemName);
await ctx.Repository.AddAccount(system.Id, ctx.Author.Id);
// TODO: better message, perhaps embed like in groups?
await ctx.Reply(
$"{Emojis.Success} Your system has been created. Type `pk;system` to view it, and type `pk;system help` for more information about commands you can use now. Now that you have that set up, check out the getting started guide on setting up members and proxies: <https://pluralkit.me/start>");
var eb = new EmbedBuilder()
.Title(
$"{Emojis.Success} Your system has been created.")
.Field(new Embed.Field("Getting Started",
"New to PK? Check out our Getting Started guide on setting up members and proxies: https://pluralkit.me/start\n" +
"Otherwise, type `pk;system` to view your system and `pk;system help` for more information about commands you can use."))
.Field(new Embed.Field("System Recovery", "In the case of your Discord account getting lost or deleted, the PluralKit staff can help you recover your system. " +
"In order to do so, we will need your **PluralKit token**. This is the *only* way you can prove ownership so we can help you recover your system. " +
"To get it, run `pk;token` and then store it in a safe place.\n\n" +
"Keep your token safe, if other people get access to it they can also use it to access your system. " +
"If your token is ever compromised run `pk;token refresh` to invalidate the old token and get a new one."))
.Field(new Embed.Field("Questions?",
"Please join the PK server https://discord.gg/PczBt78 if you have any questions, we're happy to help"));
await ctx.Reply(embed: eb.Build());
}
public async Task DisplayId(Context ctx, PKSystem target)