info and help with test

This commit is contained in:
Owen
2024-12-14 00:17:30 +01:00
parent 5975458407
commit 5d6e632a1d
10 changed files with 146 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
defmodule PlantIdDiscordBot.Utils do
@start_time Application.compile_env(:plantid_discord_bot, :start_time)
def get_uptime() do
DateTime.diff(DateTime.utc_now(), @start_time)
|> PlantIdDiscordBot.Utils.Duration.sec_to_str()
end
def get_shard_latency() do
Nostrum.Util.get_all_shard_latencies()
|> Map.get(0)
|> to_string()
|> Kernel.<>("ms")
end
end