All Projects → Kraigie → Nostrum

Kraigie / Nostrum

Licence: mit
Elixir Discord Library

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Nostrum

Discord.js Menu
💬 Easily create Discord.js v12 embed menus with reactions and unlimited customizable pages.
Stars: ✭ 89 (-67.52%)
Mutual labels:  discord-api, bot, discord-bot, library, discord
Discord Bot Client
A patched version of discord, with bot login support
Stars: ✭ 441 (+60.95%)
Mutual labels:  discord-api, bot, discord-bot, discord
Music Bot
Simple music bot with a full-blown queue system that is easy to understand
Stars: ✭ 102 (-62.77%)
Mutual labels:  discord-api, bot, discord-bot, discord
Discord.js
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
Stars: ✭ 16,432 (+5897.08%)
Mutual labels:  discord-api, bot, discord-bot, discord
Nino
🔨 Advanced and cute moderation discord bot as an entry of Discord's Hack Week!
Stars: ✭ 78 (-71.53%)
Mutual labels:  discord-api, bot, discord-bot, discord
Commando
Official command framework for discord.js
Stars: ✭ 434 (+58.39%)
Mutual labels:  discord-api, bot, discord-bot, discord
Discord Panel
📊 User friendly dashboard/tool for discord bot developpers to manage servers
Stars: ✭ 116 (-57.66%)
Mutual labels:  discord-api, bot, discord-bot, discord
Xiao
Xiao is a Discord bot coded in JavaScript with discord.js using the Commando command framework. With over 500 commands, she is one of the most feature-rich bots out there. Formerly XiaoBot.
Stars: ✭ 302 (+10.22%)
Mutual labels:  discord-api, bot, discord-bot, discord
Deku
Multi-purpose discord bot built with discord.js
Stars: ✭ 13 (-95.26%)
Mutual labels:  discord-api, bot, discord-bot, discord
Modmail
A feature rich discord Modmail bot
Stars: ✭ 957 (+249.27%)
Mutual labels:  discord-api, bot, discord-bot, discord
Lenoxbot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 163 (-40.51%)
Mutual labels:  discord-api, bot, discord-bot, discord
Bot
A Discord bot for all your needs. With memes, utilities, moderation & more, Fire is the only bot you'll need.
Stars: ✭ 79 (-71.17%)
Mutual labels:  discord-api, bot, discord-bot, discord
Basicbot
A basic example of a Discord Bot written in Python. (discord.py)
Stars: ✭ 73 (-73.36%)
Mutual labels:  discord-api, bot, discord-bot, discord
Discordeno
Discord API library for Deno
Stars: ✭ 254 (-7.3%)
Mutual labels:  discord-api, discord-bot, library, discord
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (+34.31%)
Mutual labels:  discord-api, bot, discord-bot, discord
Smorebot
SmoreBot is a fun, lightweight, multipurpose bot packed with features.
Stars: ✭ 51 (-81.39%)
Mutual labels:  discord-api, bot, discord-bot, discord
Dsharpplus
A .NET Standard library for making bots using the Discord API.
Stars: ✭ 635 (+131.75%)
Mutual labels:  discord-api, bot, discord-bot, discord
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+255.11%)
Mutual labels:  discord-api, bot, discord-bot, discord
Aegis.cpp
Discord C++ library for interfacing with the API. Join our server:
Stars: ✭ 198 (-27.74%)
Mutual labels:  discord-api, bot, library, discord
Example Bots
An example bot directory for DiscordSharpPlus library. Contains C# and VB.NET examples.
Stars: ✭ 69 (-74.82%)
Mutual labels:  discord-api, bot, discord-bot

Nostrum

Build Status Join Discord

An Elixir library for the Discord API.

It is highly recommended to check out the documentation first. It includes all of the information listed here and more.

Installation

Add Nostrum as a dependency:

Stable

Stable documentation can be found here

def deps do
  [{:nostrum, "~> 0.4"}]
end

Dev

def deps do
  [{:nostrum, git: "https://github.com/Kraigie/nostrum.git"}]
end

Edit or create your config file:

The file should be located at /config/config.exs. To run Nostrum you need the following two fields:

config :nostrum,
  token: "666", # The token of your bot as a string
  num_shards: 2 # The number of shards you want to run your bot under, or :auto.

For more information about the differences between dev and stable as well as additional config parameters, please see the documentation.

Example Usage

The below module needs to be started in some fashion to capture events. See here for a full example.

defmodule ExampleConsumer do
  use Nostrum.Consumer

  alias Nostrum.Api

  def start_link do
    Consumer.start_link(__MODULE__)
  end

  def handle_event({:MESSAGE_CREATE, msg, _ws_state}) do
    case msg.content do
      "ping!" ->
        Api.create_message(msg.channel_id, "I copy and pasted this code")
      _ ->
        :ignore
    end
  end

  # Default event handler, if you don't include this, your consumer WILL crash if
  # you don't have a method definition for each event type.
  def handle_event(_event) do
    :noop
  end
end

Although it's recommended to run under a supervisor, you could start it from iex.

  iex()> ExampleConsumer.start
  {:ok, #PID<0.208.0>}

Getting Help

If you need help, visit #elixir_nostrum on the unofficial Discord API guild!

Discord API

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].