Files
omnibot/lib/contrib/fortune.ex
Alek Ratzloff e2a746709d Update Plugin.GenServer to match the same pattern that Plugin.Supervisor does, remove Omnibot.Plugin
* using Plugin.GenServer now uses Plugin.Base so that is not required
* Remove Omnibot.Plugin because all it did was include Plugin.GenServer
  and Plugin.Base

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-11 16:01:57 -07:00

32 lines
733 B
Elixir
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

defmodule Omnibot.Contrib.Fortune do
use Omnibot.Plugin.GenServer
@fortunes [
"Reply hazy, try again",
"Excellent Luck",
"Good Luck",
"Average Luck",
"Bad Luck",
"Good news will come to you by mail",
"´_ゝ`",
"タ━━━━━━(゚∀゚)━━━━━━ !!!!",
"You will meet a dark handsome stranger",
"Better not tell you now",
"Outlook good",
"Very Bad Luck",
"Godly Luck",
]
command "!fortune", [to] do
fortune = Enum.random(@fortunes)
reply = "#{to}: #{fortune}"
Irc.send_to(irc, channel, reply)
end
command "!fortune" do
fortune = Enum.random(@fortunes)
reply = "#{nick}: #{fortune}"
Irc.send_to(irc, channel, reply)
end
end