Quick to launch, easy to scale, and effortless!
Excord is an Discord wrapper written in Elixir, designed to build scalable and reliable Discord bots quickly and effortlessly.
Excord is not yet available on Hex, so you need to install it directly from GitHub:
def deps do
[
{:excord, github: "PenguinBoi12/excord"}
]
endNote: Excord requires Elixir 1.18 or higher.
Create a bot module using Excord.Bot:
defmodule MyBot do
use Excord.Bot, otp_app: :my_bot
# /ping
command ping(ctx, _args) do
Message.send(ctx, "Pong!")
end
on ready(_) do
IO.puts("Your bot is online and ready to use!")
end
endAdd your bot's configuration in config/config.exs
config :excord_example, MyBot,
token: System.get_env("TOKEN") || raise "enviroment variable TOKEN is missing"Finally, include your bot in the application's supervision tree:
defmodule MyBot.Application do
use Application
def start(_type, _args) do
children = [
MyBot
]
Supervisor.start_link(children, strategy: :one_for_one)
end
endIf you need help don't hestiate to contact me (Malassi) on Discord.
If you'd like to help me or improve the project, I welcome any contributions to Excord!