Giter Club home page Giter Club logo

interaction-handler's Introduction

Karma

๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ผ๐—ป ๐—›๐—ฎ๐—ป๐—ฑ๐—น๐—ฒ๐—ฟ

A simple slash-command handler for Discord.JS, (requires discord.js@latest)
Explore the docs ยป

NOTE: This is a little outdated, and the code quality isn't so good. However, it should still work!

๐—œ๐—ป๐˜€๐˜๐—ฎ๐—น๐—น๐—ฎ๐˜๐—ถ๐—ผ๐—ป

  • Add interactionEvent.js.js to a folder within your root directory.
  • Add the snippet of code (ready-event-snippet.js) to your ready event.
  • Create a folder called "interactions" and add all of your code there for slash commands.

๐—™๐—ถ๐—น๐—ฒ ๐—ฆ๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ

You don't have to have your like this, but it's how I've set it up in the code so if you wish to edit it, you can :D

root/
โ”œโ”€ index.js
|
โ”œโ”€ interactions/
โ”‚  โ”œโ”€ ping.js
โ”‚  โ”œโ”€ foobar.js
|
โ”œโ”€ events/
โ”‚  โ”œโ”€ ready.js
|  โ”œโ”€ interactionEvent.js

๐—˜๐˜…๐˜๐—ฟ๐—ฎ ๐—œ๐—ป๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป

  1. I've added the module.export example in the example folder that you need in all of your slash command files (interactions/) in order for them to register.
  2. If you need any help, join my discord or open up an issue on this repository.
  3. Let me know of any suggestions or improvements you have, but yeh! Enjoy :)

interaction-handler's People

Contributors

larkify avatar

Stargazers

Hazza avatar

Watchers

 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.