TTtie b1e27cd71e fix: ensure editChannelPosition works as it should, remove flags (#276)
- Removes `flags` from `editChannelPosition` and `editChannelPositions`
as per [1]
- Adds `reason` to `editChannelPosition{,s}` as an option, and a
parameter respectively per [2].
- Fixes a couple wrongs with `editChannelPosition`:
- Construction of the endpoint still depended on the channel map being
present, which might not be the case when channel maps are disabled
- `options.lockPermissions` and `options.parentID` now correctly affects
only the channel being moved around

Ref:
https://github.com/discord/discord-api-docs/commit/c989436e97b194350ec4712aec77207c2f9f2332
[1]
Ref:
https://github.com/discord/discord-api-docs/commit/ee16658e2304c3b44b2c652f4cae0a4363c4c081
[2]
2026-11-28 22:21:31 +01:00
2021-10-31 01:34:51 +00:00
2024-10-28 02:18:16 +00:00
2024-10-28 02:18:16 +00:00
2022-10-09 20:34:42 +00:00

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.

License

Refer to the LICENSE file.

S
Description
A fork of Eris, a Discord Node.js library, focused on keeping up with the latest Discord API changes.
Readme MIT
11 MiB
Languages
JavaScript 100%