mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 14:57:54 +00:00
feat: dynamically show primary command prefix
This commit is contained in:
parent
1d50022d6d
commit
edfc6714d6
30 changed files with 202 additions and 197 deletions
|
|
@ -182,7 +182,7 @@ public class Config
|
|||
eb.Description(description.ToString());
|
||||
|
||||
// using *large* blue diamond here since it's easier to see in the small footer
|
||||
eb.Footer(new("\U0001f537 means this setting was changed. Type `pk;config <setting name> clear` to reset it to the default."));
|
||||
eb.Footer(new($"\U0001f537 means this setting was changed. Type `{ctx.DefaultPrefix}config <setting name> clear` to reset it to the default."));
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
|
@ -263,7 +263,7 @@ public class Config
|
|||
|
||||
public async Task SystemTimezone(Context ctx)
|
||||
{
|
||||
if (ctx.System == null) throw Errors.NoSystemError;
|
||||
if (ctx.System == null) throw Errors.NoSystemError(ctx.DefaultPrefix);
|
||||
|
||||
if (ctx.MatchClear())
|
||||
{
|
||||
|
|
@ -277,7 +277,7 @@ public class Config
|
|||
if (zoneStr == null)
|
||||
{
|
||||
await ctx.Reply(
|
||||
$"Your current system time zone is set to **{ctx.Config.UiTz}**. It is currently **{SystemClock.Instance.GetCurrentInstant().FormatZoned(ctx.Config.Zone)}** in that time zone. To change your system time zone, type `pk;config tz <zone>`.");
|
||||
$"Your current system time zone is set to **{ctx.Config.UiTz}**. It is currently **{SystemClock.Instance.GetCurrentInstant().FormatZoned(ctx.Config.Zone)}** in that time zone. To change your system time zone, type `{ctx.DefaultPrefix}config tz <zone>`.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ public class Config
|
|||
|
||||
String Response(bool isError, bool val)
|
||||
=> $"Reaction pings are {(isError ? "already" : "currently")} **{EnabledDisabled(val)}** for your system. "
|
||||
+ $"To {EnabledDisabled(!val)[..^1]} reaction pings, type `pk;config ping {EnabledDisabled(!val)[..^1]}`.";
|
||||
+ $"To {EnabledDisabled(!val)[..^1]} reaction pings, type `{ctx.DefaultPrefix}config ping {EnabledDisabled(!val)[..^1]}`.";
|
||||
|
||||
if (!ctx.HasNext())
|
||||
{
|
||||
|
|
@ -385,8 +385,8 @@ public class Config
|
|||
{
|
||||
if (!ctx.HasNext())
|
||||
{
|
||||
if (ctx.Config.MemberDefaultPrivate) { await ctx.Reply("Newly created members will currently have their privacy settings set to private. To change this, type `pk;config private member off`"); }
|
||||
else { await ctx.Reply("Newly created members will currently have their privacy settings set to public. To automatically set new members' privacy settings to private, type `pk;config private member on`"); }
|
||||
if (ctx.Config.MemberDefaultPrivate) { await ctx.Reply($"Newly created members will currently have their privacy settings set to private. To change this, type `{ctx.DefaultPrefix}config private member off`"); }
|
||||
else { await ctx.Reply($"Newly created members will currently have their privacy settings set to public. To automatically set new members' privacy settings to private, type `{ctx.DefaultPrefix}config private member on`"); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -409,8 +409,8 @@ public class Config
|
|||
{
|
||||
if (!ctx.HasNext())
|
||||
{
|
||||
if (ctx.Config.GroupDefaultPrivate) { await ctx.Reply("Newly created groups will currently have their privacy settings set to private. To change this, type `pk;config private group off`"); }
|
||||
else { await ctx.Reply("Newly created groups will currently have their privacy settings set to public. To automatically set new groups' privacy settings to private, type `pk;config private group on`"); }
|
||||
if (ctx.Config.GroupDefaultPrivate) { await ctx.Reply($"Newly created groups will currently have their privacy settings set to private. To change this, type `{ctx.DefaultPrefix}config private group off`"); }
|
||||
else { await ctx.Reply($"Newly created groups will currently have their privacy settings set to public. To automatically set new groups' privacy settings to private, type `{ctx.DefaultPrefix}config private group on`"); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue