Coder Social home page Coder Social logo

Comments (6)

loveisglitchy avatar loveisglitchy commented on July 29, 2024

I don't think this would be beneficial to those that don't use aliases.

from slappey.

lavadragon15396 avatar lavadragon15396 commented on July 29, 2024

I don't think this would be beneficial to those that don't use aliases.

though it would for those who do use them and don't want to make 2 commands and copy the code

from slappey.

GAndersenCode avatar GAndersenCode commented on July 29, 2024

Why not just use the aliases as they are in slappey today?

from slappey.

lavadragon15396 avatar lavadragon15396 commented on July 29, 2024

Why not just use the aliases as they are in slappey today?

there are aliases already?
how do you use them

from slappey.

GAndersenCode avatar GAndersenCode commented on July 29, 2024

Why not just use the aliases as they are in slappey today?

there are aliases already?
how do you use them

Yes, slappey supports aliases by default.
Here is a basic test command:

const BaseCommand = require('../../utils/structures/BaseCommand');

module.exports = class TestCommand extends BaseCommand {
  constructor() {
    super('test', 'testing', ['alias1', 'alias2', 'etc']);
  }

  async run(client, message, args) {
    for (const cmd of client.commands.array()){
      console.log(cmd);
    }
  }
}

This has command with name: test
Also answers to the three aliases: alias1, alias2 and etc

Each element in the array (third parameter in the super) is an alias

from slappey.

lavadragon15396 avatar lavadragon15396 commented on July 29, 2024

Why not just use the aliases as they are in slappey today?

there are aliases already?
how do you use them

Yes, slappey supports aliases by default.
Here is a basic test command:

const BaseCommand = require('../../utils/structures/BaseCommand');

module.exports = class TestCommand extends BaseCommand {
  constructor() {
    super('test', 'testing', ['alias1', 'alias2', 'etc']);
  }

  async run(client, message, args) {
    for (const cmd of client.commands.array()){
      console.log(cmd);
    }
  }
}

This has command with name: test
Also answers to the three aliases: alias1, alias2 and etc

Each element in the array (third parameter in the super) is an alias

okay thanks ill try that

from slappey.

Related Issues (20)

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.