Created
February 18, 2017 23:35
-
-
Save cronokirby/d6b5404667a5402cd16c19e124f6e88c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Script do | |
@moduledoc false | |
use Application | |
alias Alchemy.Client | |
@token "token" | |
defmodule Commands do | |
use Alchemy.Cogs | |
Cogs.def ping do | |
Cogs.say("pong!") | |
end | |
Cogs.def echo(word) do | |
Cogs.say(word) | |
end | |
end | |
def start(_type, _args) do | |
run = Client.start(@token) | |
use Commands | |
run | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment