Skip to content

PenguinBoi12/excord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Excord

Quick to launch, easy to scale, and effortless!

Join on Discord License Elixir

Excord is an Discord wrapper written in Elixir, designed to build scalable and reliable Discord bots quickly and effortlessly.

Installation

Excord is not yet available on Hex, so you need to install it directly from GitHub:

def deps do
  [
    {:excord, github: "PenguinBoi12/excord"}
  ]
end

Note: Excord requires Elixir 1.18 or higher.

Getting Started

1. Define Your Bot

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
end

2. Configure Your Bot

Add your bot's configuration in config/config.exs

config :excord_example, MyBot,
  token: System.get_env("TOKEN") || raise "enviroment variable TOKEN is missing"

3. Add Your Bot to the Supervisor

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
end

Need Help?

If you need help don't hestiate to contact me (Malassi) on Discord.

Contribution

If you'd like to help me or improve the project, I welcome any contributions to Excord!

About

Discord bot library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages