GithubHelp home page GithubHelp logo

givies-framework's Introduction

Givies-Framework

Discord Server CI CodeFactor NPM Release

A framework to facilitate the development of Discord bots using Eris.

Design Features

This framework includes amazing features such as:

  • Giveaways
  • Utility Classes
    • Logger
    • RichEmbed Constructor
    • and more...

Developing a Discord bot using Givies-Framework

To start developing a Discord bot, you may first initialize a new NodeJS project and install the necessary dependencies. Here's a simple steps how to get done:

  • Initialize a NodeJS project: npm init -y
  • Install Givies-Framework and Eris: npm install eris givies-framework
  • Open your project using any suitable code editor

Code Example:

Below is a very basic example how it works in JavaScript.

const Eris = require("eris");
const GiviesFramework = require("givies-framework");

const client = new Eris.Client("Bot <BOT_TOKEN>", {
    intents: [
        "guilds",
        "guildMessages"
    ]
});
const logger = new GiviesFramework.Utils.Logger();

client.on("ready", () => {
    logger.info({ message: `${client.user.username} is Ready`, subTitle: "Discord::Ready", title: "ERIS" });
});

client.on("messageCreate", async (message) => {
    if (message.author.bot) return;

    if (message.content === "!ping") {
        const embed = new GiviesFramework.Utils.RichEmbed();
            .setTitle("Bot's ping")
            .setDescription(`Pong! | ${message.member.guild.shard.latency}ms`)
            .setColor(0x7289DA);

        return client.createMessage(message.channel.id, { embed: embed });
    }
});

client.connect();

Contributing

Any contributions can be made via pull requests.

If you are confused where to get started, the issue-tracker is the best place to track any current existing issues.

Note: Please make sure to follow its Contributing Guidelines before proceeding.

License

This framework is released under the MIT License.

givies-framework's People

Contributors

dependabot[bot] avatar reinacchi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

00-00-00-11

givies-framework's Issues

Remove Image classes

I don't find these being useful around and currently, it's required to have a Comismsh.ttf file whereas it's unnecessary since no one's going to use Captcha anyhow.

I'm going to open a PR to resolve this.

Refactor Logging Appearance

Would anyone want an improvement with the Logger class message appearance?

Here's the comparison between the old logging and the new one:

OLD

image

NEW

image

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.