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:
2020-07-01 12:04:51 -07:00
parent 871b7771fe
commit 67ba7a5847
13 changed files with 332 additions and 5 deletions

View File

@@ -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