Files
omnibot/lib/contrib/fortune.ex
2020-07-12 12:19:14 -07:00

32 lines
723 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
@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