Skip to content

A fork of Eris, a Discord Node.js library, focused on keeping up with the latest Discord API changes.

License

Notifications You must be signed in to change notification settings

projectdysnomia/dysnomia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

56d0219 · Feb 23, 2025
Nov 18, 2024
Aug 2, 2024
Feb 5, 2025
Oct 31, 2021
Nov 18, 2024
Sep 6, 2024
Oct 9, 2022
Oct 17, 2023
Aug 22, 2024
Oct 28, 2024
Feb 23, 2025
Oct 28, 2024
Jan 12, 2025
Jul 17, 2017

Repository files navigation

Project Dysnomia

A fork of Eris, a Node.js wrapper for interfacing with Discord, focused on keeping up with the latest Discord API changes.

Installing

You will need Node.js 18+. Voice support requires additional software.

npm install --omit=optional @projectdysnomia/dysnomia

If you'd like to install the development versions of the library, use the following command instead:

npm install --omit=optional "github:projectdysnomia/dysnomia#dev"

If you need voice support, remove the --omit=optional.

Ping Pong Example

const Dysnomia = require("@projectdysnomia/dysnomia");

// Replace TOKEN with your bot account's token
const bot = new Dysnomia.Client("Bot TOKEN", {
    gateway: {
        intents: [
            "guildMessages"
        ]
    }
});

bot.on("ready", () => { // When the bot is ready
    console.log("Ready!"); // Log "Ready!"
});

bot.on("error", (err) => {
  console.error(err); // or your preferred logger
});

bot.on("messageCreate", (msg) => { // When a message is created
    if(msg.content === "!ping") { // If the message content is "!ping"
        bot.createMessage(msg.channel.id, "Pong!");
        // Send a message in the same channel with "Pong!"
    } else if(msg.content === "!pong") { // Otherwise, if the message is "!pong"
        bot.createMessage(msg.channel.id, "Ping!");
        // Respond with "Ping!"
    }
});

bot.connect(); // Get the bot to connect to Discord

More examples can be found in the examples folder.

Useful Links

License

Refer to the LICENSE file.