mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: fetch guild settings for server tag in system card
This commit is contained in:
parent
83212b4bb2
commit
0d583a2a6b
2 changed files with 8 additions and 3 deletions
|
|
@ -86,11 +86,13 @@ namespace PluralKit.Bot {
|
|||
|
||||
if (cctx.Guild != null)
|
||||
{
|
||||
if (cctx.MessageContext.SystemGuildTag != null && cctx.MessageContext.TagEnabled)
|
||||
eb.Field(new($"Tag (in server '{cctx.Guild.Name}')", cctx.MessageContext.SystemGuildTag
|
||||
var guildSettings = await _repo.GetSystemGuild(conn, cctx.Guild.Id, system.Id);
|
||||
|
||||
if (guildSettings.Tag != null && guildSettings.TagEnabled)
|
||||
eb.Field(new($"Tag (in server '{cctx.Guild.Name}')", guildSettings.Tag
|
||||
.EscapeMarkdown(), true));
|
||||
|
||||
if (!cctx.MessageContext.TagEnabled)
|
||||
if (!guildSettings.TagEnabled)
|
||||
eb.Field(new($"Tag (in server '{cctx.Guild.Name}')", "*(tag is disabled in this server)*"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,5 +16,8 @@
|
|||
|
||||
public AutoproxyMode AutoproxyMode { get; } = AutoproxyMode.Off;
|
||||
public MemberId? AutoproxyMember { get; }
|
||||
|
||||
public string? Tag { get; }
|
||||
public bool TagEnabled { get; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue