Coder Social home page Coder Social logo

iifdct / dysnomia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from projectdysnomia/dysnomia

0.0 0.0 0.0 4.17 MB

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

License: MIT License

JavaScript 100.00%

dysnomia's Introduction

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.

dysnomia's People

Contributors

abalabahaha avatar tttie avatar bsian03 avatar khaaz avatar donovandmc avatar apacheli avatar hsiw avatar eritbh avatar skillz4killz avatar iifdct avatar brayzure avatar ljneon avatar macdja38 avatar alex-taxiera avatar cryptiklemur avatar aurieh avatar snazzah avatar ratismal avatar oathompsonjones avatar motoenduroboy avatar merghq avatar briantanner avatar retrixe avatar fuechschen avatar zerefdev avatar justcat80 avatar reboxer avatar ak-s avatar jagrosh avatar cernodile avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.