Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/projectdysnomia/dysnomia
A fork of Eris, a Discord Node.js library, focused on keeping up with the latest Discord API changes.
https://github.com/projectdysnomia/dysnomia
bot discord discord-api dysnomia nodejs
Last synced: about 8 hours ago
JSON representation
A fork of Eris, a Discord Node.js library, focused on keeping up with the latest Discord API changes.
- Host: GitHub
- URL: https://github.com/projectdysnomia/dysnomia
- Owner: projectdysnomia
- License: mit
- Created: 2022-10-11T18:13:57.000Z (over 2 years ago)
- Default Branch: dev
- Last Pushed: 2025-01-12T14:50:03.000Z (14 days ago)
- Last Synced: 2025-01-12T15:42:56.396Z (14 days ago)
- Topics: bot, discord, discord-api, dysnomia, nodejs
- Language: JavaScript
- Homepage:
- Size: 4.42 MB
- Stars: 49
- Watchers: 1
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Project Dysnomia
====A fork of [Eris](https://github.com/abalabahaha/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](https://github.com/nodejs/node-gyp#installation).
```
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
-----------------```js
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](examples).
Useful Links
------------- [The official Project Dysnomia server](https://discord.gg/2uUvgJzgCE) is the best place to get support.
- [The GitHub repo](https://github.com/projectdysnomia/dysnomia) is where development primarily happens.
- [The NPM package webpage](https://npmjs.com/package/@projectdysnomia/dysnomia) is, well, the webpage for the NPM package.License
-------Refer to the [LICENSE](LICENSE) file.