mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-16 10:40:12 +00:00
remove rest of the parsing in csharp bot
This commit is contained in:
parent
15ffd16c01
commit
479e0a59b5
35 changed files with 242 additions and 409 deletions
|
|
@ -7,28 +7,13 @@ public partial class CommandTree
|
|||
private async Task PrintCommandList(Context ctx, string subject, string commands)
|
||||
{
|
||||
await ctx.Reply(
|
||||
$"Here is a list of commands related to {subject}:",
|
||||
embed: new Embed()
|
||||
{
|
||||
Description = $"{commands}\nFor a full list of possible commands, see <https://pluralkit.me/commands>.",
|
||||
Color = DiscordUtils.Blue,
|
||||
}
|
||||
components: [
|
||||
new MessageComponent()
|
||||
{
|
||||
Type = ComponentType.Text,
|
||||
Content = $"Here is a list of commands related to {subject}:\n{commands}\nFor a full list of possible commands, see <https://pluralkit.me/commands>.",
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private async Task<string> CreateSystemNotFoundError(Context ctx)
|
||||
{
|
||||
var input = ctx.PopArgument();
|
||||
if (input.TryParseMention(out var id))
|
||||
{
|
||||
// Try to resolve the user ID to find the associated account,
|
||||
// so we can print their username.
|
||||
var user = await ctx.Rest.GetUser(id);
|
||||
if (user != null)
|
||||
return $"Account **{user.Username}#{user.Discriminator}** does not have a system registered.";
|
||||
return $"Account with ID `{id}` not found.";
|
||||
}
|
||||
|
||||
return $"System with ID {input.AsCode()} not found.";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue