Add shard info to stats embed

This commit is contained in:
Noikoio 2019-09-06 21:50:10 -07:00
parent d06afbd510
commit de7752eb21

View file

@ -140,12 +140,13 @@ Friend Class HelpInfoCommands
End Function End Function
Private Async Function CmdInfo(param As String(), reqChannel As SocketTextChannel, reqUser As SocketGuildUser) As Task Private Async Function CmdInfo(param As String(), reqChannel As SocketTextChannel, reqUser As SocketGuildUser) As Task
' Bot status field ' Bot stats field
Dim strStatus As New StringBuilder Dim strStats As New StringBuilder
Dim asmnm = Reflection.Assembly.GetExecutingAssembly.GetName() Dim asmnm = Reflection.Assembly.GetExecutingAssembly.GetName()
strStatus.AppendLine("Birthday Bot v" + asmnm.Version.ToString(3)) strStats.AppendLine("Birthday Bot v" + asmnm.Version.ToString(3))
strStatus.AppendLine("Server count: " + Discord.Guilds.Count.ToString()) strStats.AppendLine("Server count: " + Discord.Guilds.Count.ToString())
strStatus.AppendLine("Uptime: " + BotUptime()) strStats.AppendLine("Shard #" + Discord.GetShardIdFor(reqChannel.Guild).ToString())
strStats.AppendLine("Uptime: " + BotUptime())
' TODO fun stats ' TODO fun stats
' current birthdays, total names registered, unique time zones ' current birthdays, total names registered, unique time zones
@ -162,7 +163,7 @@ Friend Class HelpInfoCommands
Dim verstr = Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(3) Dim verstr = Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(3)
embed.AddField(New EmbedFieldBuilder With { embed.AddField(New EmbedFieldBuilder With {
.Name = "Statistics", .Name = "Statistics",
.Value = strStatus.ToString() .Value = strStats.ToString()
}) })
Await reqChannel.SendMessageAsync(embed:=embed.Build()) Await reqChannel.SendMessageAsync(embed:=embed.Build())
End Function End Function