mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
feat(bot): use button for cv2 cards dashboard link
This commit is contained in:
parent
5b0e29b446
commit
8ae3b29064
1 changed files with 48 additions and 9 deletions
|
|
@ -141,7 +141,7 @@ public class EmbedService
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Text,
|
||||||
Content = $"## [{systemName ?? $"`{system.DisplayHid(cctx.Config)}`"}](https://dash.pluralkit.me/profile/s/{system.Hid}){premiumText}",
|
Content = $"## {systemName ?? $"`{system.DisplayHid(cctx.Config)}`"}{premiumText}",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -180,11 +180,24 @@ public class EmbedService
|
||||||
AccentColor = system.Color?.ToDiscordColor(),
|
AccentColor = system.Color?.ToDiscordColor(),
|
||||||
Components = [ ..header, ..switchComponent, linkedAccounts, ..descComponents ],
|
Components = [ ..header, ..switchComponent, linkedAccounts, ..descComponents ],
|
||||||
},
|
},
|
||||||
|
new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Section,
|
||||||
|
Components = [
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Text,
|
||||||
Content = $"-# System ID: `{system.DisplayHid(cctx.Config)}`\n-# Created: {system.Created.FormatZoned(cctx.Zone)}",
|
Content = $"-# System ID: `{system.DisplayHid(cctx.Config)}`\n-# Created: {system.Created.FormatZoned(cctx.Zone)}",
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
Accessory = new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Button,
|
||||||
|
Style = ButtonStyle.Link,
|
||||||
|
Label = "View on dashboard",
|
||||||
|
Url = $"https://dash.pluralkit.me/profile/s/{system.Hid}",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -410,7 +423,7 @@ public class EmbedService
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Text,
|
||||||
Content = $"## [{name}](https://dash.pluralkit.me/profile/m/{member.Hid}){(systemName != null ? $" ({systemName})" : "")}",
|
Content = $"## {name}{(systemName != null ? $" ({systemName})" : "")}",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -442,11 +455,24 @@ public class EmbedService
|
||||||
AccentColor = member.Color?.ToDiscordColor(),
|
AccentColor = member.Color?.ToDiscordColor(),
|
||||||
Components = [ ..header, ..extraData, ..descComponents ],
|
Components = [ ..header, ..extraData, ..descComponents ],
|
||||||
},
|
},
|
||||||
|
new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Section,
|
||||||
|
Components = [
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Text,
|
||||||
Content = $"-# System ID: `{system.DisplayHid(ccfg)}` \u2219 Member ID: `{member.DisplayHid(ccfg)}`{(member.MetadataPrivacy.CanAccess(ctx) ? $"\n-# Created: {member.Created.FormatZoned(zone)}" : "")}",
|
Content = $"-# System ID: `{system.DisplayHid(ccfg)}` \u2219 Member ID: `{member.DisplayHid(ccfg)}`{(member.MetadataPrivacy.CanAccess(ctx) ? $"\n-# Created: {member.Created.FormatZoned(zone)}" : "")}",
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
Accessory = new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Button,
|
||||||
|
Style = ButtonStyle.Link,
|
||||||
|
Label = "View on dashboard",
|
||||||
|
Url = $"https://dash.pluralkit.me/profile/m/{member.Hid}",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -584,7 +610,7 @@ public class EmbedService
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Text,
|
||||||
Content = $"## [{name}](https://dash.pluralkit.me/profile/g/{target.Hid}){(systemName != null ? $" ({systemName})" : "")}",
|
Content = $"## {name}{(systemName != null ? $" ({systemName})" : "")}",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -616,11 +642,24 @@ public class EmbedService
|
||||||
AccentColor = target.Color?.ToDiscordColor(),
|
AccentColor = target.Color?.ToDiscordColor(),
|
||||||
Components = [ ..header, ..descComponents ],
|
Components = [ ..header, ..descComponents ],
|
||||||
},
|
},
|
||||||
|
new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Section,
|
||||||
|
Components = [
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Text,
|
||||||
Content = $"-# System ID: `{system.DisplayHid(ctx.Config)}` \u2219 Group ID: `{target.DisplayHid(ctx.Config)}`{(target.MetadataPrivacy.CanAccess(pctx) ? $"\n-# Created: {target.Created.FormatZoned(ctx.Zone)}" : "")}",
|
Content = $"-# System ID: `{system.DisplayHid(ctx.Config)}` \u2219 Group ID: `{target.DisplayHid(ctx.Config)}`{(target.MetadataPrivacy.CanAccess(pctx) ? $"\n-# Created: {target.Created.FormatZoned(ctx.Zone)}" : "")}",
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
Accessory = new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Button,
|
||||||
|
Style = ButtonStyle.Link,
|
||||||
|
Label = "View on dashboard",
|
||||||
|
Url = $"https://dash.pluralkit.me/profile/g/{target.Hid}",
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue