summaryrefslogtreecommitdiff
path: root/lib/plugins/base.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/base.ex')
-rw-r--r--lib/plugins/base.ex22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/plugins/base.ex b/lib/plugins/base.ex
index 1baf066..97aaa05 100644
--- a/lib/plugins/base.ex
+++ b/lib/plugins/base.ex
@@ -120,16 +120,24 @@ defmodule Nola.Plugins.Base do
system = :erlang.system_info(:system_architecture) |> to_string()
brand = Nola.brand(:name)
owner = "#{Nola.brand(:owner)} <#{Nola.brand(:owner_email)}>"
- message.replyfun.([
- <<"🤖 I am a robot running", 2, "#{brand}, version #{ver}", 2, " — source: #{Nola.source_url()}">>,
- "🦾 Elixir #{elixir_ver} #{otp_ver} on #{system}",
- "👷‍♀️ Owner: h#{owner}",
- "🌍 Web interface: #{url}"
- ])
+
+ if message.channel do
+ message.replyfun.([
+ <<"🤖 ", 2, "#{brand}", 2, " v", 2, "#{ver}", 2, "! My owner is #{Nola.brand(:owner)} and help is at #{url}">>,
+ ])
+ else
+ message.replyfun.([
+ <<"🤖 I am a robot running ", 2, "#{brand}", 2, " version ", 2, "#{ver}", 2, " — source: #{Nola.source_url()}">>,
+ "Source code: #{Nola.source_url()}",
+ "🦾 Elixir #{elixir_ver} #{otp_ver} on #{system}",
+ "🙋🏻 Owner: #{owner}",
+ "🌍 Web interface: #{url}"
+ ])
+ end
{:noreply, nil}
end
- def handle_info(msg, _) do
+ def handle_info(_msg, _) do
{:noreply, nil}
end