1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-20 00:43:36 +03:00

Add PremiumSince field

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
This commit is contained in:
Macintxsh 2023-09-28 21:27:06 +03:00
parent 5893cab4fa
commit c93d7ca8d3
Signed by: mctaylors
GPG key ID: 361D326747B61E65
5 changed files with 23 additions and 2 deletions

View file

@ -645,4 +645,7 @@
<data name="ShowInfoGuildRoles" xml:space="preserve">
<value>Roles</value>
</data>
<data name="ShowInfoGuildMemberPremiumSince" xml:space="preserve">
<value>Guild Nitro booster since</value>
</data>
</root>

View file

@ -645,4 +645,7 @@
<data name="ShowInfoGuildRoles" xml:space="preserve">
<value>Роли</value>
</data>
<data name="ShowInfoGuildMemberPremiumSince" xml:space="preserve">
<value>Nitro бустер сервера с</value>
</data>
</root>

View file

@ -645,4 +645,7 @@
<data name="ShowInfoGuildRoles" xml:space="preserve">
<value>рольки</value>
</data>
<data name="ShowInfoGuildMemberPremiumSince" xml:space="preserve">
<value>бустит сервер со времен</value>
</data>
</root>

View file

@ -96,6 +96,8 @@ public class ToolsCommandGroup : CommandGroup
var memberData = data.GetOrCreateMemberData(user.ID);
var embedColor = ColorsList.Cyan;
var guildMemberResult = await _guildApi.GetGuildMemberAsync(guildId, user.ID, ct);
DateTimeOffset? communicationDisabledUntil = null;
if (guildMemberResult.IsDefined(out var guildMember))
@ -110,8 +112,6 @@ public class ToolsCommandGroup : CommandGroup
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId, user.ID, ct);
var embedColor = ColorsList.Cyan;
if (isMuted || existingBanResult.IsDefined())
{
builder.Append("### ")
@ -162,6 +162,12 @@ public class ToolsCommandGroup : CommandGroup
builder.Append("- ").AppendLine(Messages.ShowInfoGuildMemberSince)
.AppendLine(Markdown.Timestamp(guildMember.JoinedAt));
if (guildMember.PremiumSince.IsDefined(out var premiumSince))
{
builder.Append("- ").AppendLine(Messages.ShowInfoGuildMemberPremiumSince)
.AppendLine(Markdown.Timestamp(premiumSince.Value));
}
if (guildMember.Roles.Count > 0)
{
builder.Append("- ").AppendLine(Messages.ShowInfoGuildRoles);

View file

@ -1103,5 +1103,11 @@ namespace Boyfriend {
return ResourceManager.GetString("ShowInfoGuildRoles", resourceCulture);
}
}
internal static string ShowInfoGuildMemberPremiumSince {
get {
return ResourceManager.GetString("ShowInfoGuildMemberPremiumSince", resourceCulture);
}
}
}
}