mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +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}",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -182,8 +182,21 @@ public class EmbedService
|
||||||
},
|
},
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Section,
|
||||||
Content = $"-# System ID: `{system.DisplayHid(cctx.Config)}`\n-# Created: {system.Created.FormatZoned(cctx.Zone)}",
|
Components = [
|
||||||
|
new MessageComponent()
|
||||||
|
{
|
||||||
|
Type = ComponentType.Text,
|
||||||
|
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})" : "")}",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -444,8 +457,21 @@ public class EmbedService
|
||||||
},
|
},
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Section,
|
||||||
Content = $"-# System ID: `{system.DisplayHid(ccfg)}` \u2219 Member ID: `{member.DisplayHid(ccfg)}`{(member.MetadataPrivacy.CanAccess(ctx) ? $"\n-# Created: {member.Created.FormatZoned(zone)}" : "")}",
|
Components = [
|
||||||
|
new MessageComponent()
|
||||||
|
{
|
||||||
|
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)}" : "")}",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
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})" : "")}",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -618,8 +644,21 @@ public class EmbedService
|
||||||
},
|
},
|
||||||
new MessageComponent()
|
new MessageComponent()
|
||||||
{
|
{
|
||||||
Type = ComponentType.Text,
|
Type = ComponentType.Section,
|
||||||
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)}" : "")}",
|
Components = [
|
||||||
|
new MessageComponent()
|
||||||
|
{
|
||||||
|
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)}" : "")}",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
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