Code Monkey home page Code Monkey logo

shandler's Introduction

Deprecated

It's been a long time since I last published something. I'm trying to focus on my academics as of now. So it's hard for me to maintain this package. If someone is interested in maintaining this repo, feel free to make an issue. We could bring this package back

Shandler

NPM version NPM downloads

NPM Banner

Installation

npm i shandler

or

yarn add shandler

Documentation

Official Documentation

About

This is a wrapper/command-handler for discord's new Slash Commands. Using this package, you can send/edit/delete an interaction response. As well as followup messages and more.

Contact

Need support? Join our Support server.

shandler's People

Contributors

crackedpotato007 avatar crispy-cream avatar dependabot[bot] avatar exxonnnnnn avatar gh-api-tester avatar gmbodhi avatar openmoddev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

shandler's Issues

Posting Slash commands not on bot start up

Is your feature request related to a problem? If so, please describe. If not, put N/A
n/a

Describe the solution you'd like
It would be nice is there was a method like {something}.post("file name", "guild id"); which would post the specified command. And then{something}.delete("file name", "guild id"); which would delete it. This will make it very easy for slash command settings where you can chose which commands you want.

Describe alternatives you've considered
n/a

Additional context
I put {something} bc it's 4am and I can't think of what would be the best way to do it lol

Abillity to add buttons to normal messages

Is your feature request related to a problem? If so, please describe. If not, put N/A
N/A

Describe the solution you'd like
A cool thing will be to add buttons to normal messages

Describe alternatives you've considered
undefined

Additional context
null

discord.js v12 and v13 support

Is your feature request related to a problem? If so, please describe. If not, put N/A
Yes, v12 and v13 support

Describe the solution you'd like
either an index.js file that will check which version of discord.js you are using then adapt to it. example:

var version = require('discord.js').version.split('');
version = parseInt(version[0] + version[1]);

module.exports = (client) => {

    if (version < 11 || version === 11) {
        throw new Error('The discord.js version must be v12 or high');
    }

    if (version === 12) {
        // code
    } else if (version === 13) {
        // code
    }

    return;
}

Then move from there or idk
Describe alternatives you've considered
N/A

Additional context
I will be working on a pull request for this but I would love help.

Interaction Attachments

Is your feature request related to a problem? If so, please describe. If not, put N/A
If you try to send a discord.js MessageAttachment it will throw an error.

Describe the solution you'd like
Like

interaction.reply("", { embed: embed });

have

let attachment = new Discord.MessageAttachment(buffer, "burn.png");
interaction.reply("", { attachment: attachment });

Describe alternatives you've considered
I can't think of a better alternative.

Additional context

Unexpected Token '?'

SyntaxError: Unexpected token '?'

    this.messageRefID = message_reference.message_id ?? "@original"

node_modules/shandler/js/FInteraction.js:59

feat:(interaction.defer): many people ask this

Many people ask why we're not having this .defer. From the next version, we will include this as well. We know how hard it will be to change code for the users who uses interaction.reply("", { type: 5 }) so, we won't remove the interaction.reply("", { type: 5 }).

Interaction Failed Handler

Is your feature request related to a problem? If so, please describe. If not, put N/A
It's not a Shandler related problem but this will help to solve the interaction failed messages.

Describe the solution you'd like
Maybe if it's possible make a custom Shandler event called Interaction_Failed. Or a setting to make a custom message for button fails and slash command fails.

Describe alternatives you've considered
Not sure

Additional context
o/

In progress / todo

Need to do

Done

Documentation

  • Drop down documentation
  • Defer docs
  • Exclude files
  • Remake the whole documentation system
  • button.reply
  • button.update
  • <interaction>.isComponent();
  • <interaction>.isCommand();
  • Add links for examples to Shandler Example Bot when done.

Testing

  • Test interaction.defer();
  • exclude files

Shandler Example Bot

  • re-make and update it.

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.