Polish off wordbot implementation, add Omnibot.Module.GenServer
Wordbot implementation now uses the new Omnibot.Module.GenServer module, which uses a GenServer instead of an Agent. This way, the module can receive messages and makes storage a little easier. Beyond that, minor changes all around. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -6,4 +6,12 @@ defmodule Omnibot.Util do
|
||||
def now_unix, do: now_unix("Etc/UTC")
|
||||
|
||||
def now_unix(tz), do: DateTime.now!(tz) |> DateTime.to_unix()
|
||||
|
||||
@doc """
|
||||
Inserts a zero-width space character inside of a nickname so that it won't
|
||||
create a notification for that user.
|
||||
"""
|
||||
def denotify_nick(nick) do
|
||||
Enum.join(nick, "\u200b")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user