fix: fetch guild settings for server tag in system card
This commit is contained in:
parent
83212b4bb2
commit
0d583a2a6b
@ -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…
Reference in New Issue
Block a user