WIP: Wordbot
Wordbot is a little more complex of a bot module and I've been working on it here. Other than wordbot module, a few minor tweaks have been added all around that don't really affect anything. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -2,4 +2,8 @@ defmodule Omnibot.Util do
|
||||
def string_empty?(s), do: String.length(s) == 0
|
||||
|
||||
def string_or_nil(s), do: if(string_empty?(s), do: nil, else: s)
|
||||
|
||||
def now_unix, do: now_unix("Etc/UTC")
|
||||
|
||||
def now_unix(tz), do: DateTime.now!(tz) |> DateTime.to_unix()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user