Skip to content

Instantly share code, notes, and snippets.

@TobiasFeld22
Created November 25, 2017 19:23
Show Gist options
  • Save TobiasFeld22/4711f81c62502fee7a5f2671624a8b58 to your computer and use it in GitHub Desktop.
Save TobiasFeld22/4711f81c62502fee7a5f2671624a8b58 to your computer and use it in GitHub Desktop.
Default files for spark
exports.name = "name-bf";
// Execute this command every specified amount of time.
exports.time = 0
// Delay for how long after the "ready" event this function should be executed
exports.delay = 0;
exports.function = function(client) {
// execute your code on boot here.
}
exports.name = "name-cmd"
exports.aliases = ["alias-1", "alias-2"]
exports.level = 0; // level determines who can use this command (0 = server member, 10 = the creator, you can remap this making a message function called "permissioncheck")
exports.command = function(client, message) {
// Execute code here.
}
exports.name = "name-ev"
// change ready here to one of the events of the client class ( https://discord.js.org/#/docs/main/master/class/Client )
exports.event = "ready"
// change * with the arguments the event gives (for example, the message event gives the "message" argument)
// the ready event doesn't give any arguments, etc.
exports.function = (client, *) => {
}
exports.name = "name-mf"
exports.type = ["commands", "messages"];
exports.function = function(client, message, command) {
// execute your code here
}
exports.name = "name_sp"
// change the * out with the arguments you are going to give it, this can be as many as you want.
exports.function = function(*, *){
}
// To exectute a function do this:
client.snippets.name_sp(arg_1, arg_2, etc.)
// place that in a command, or any other place, they can be used almost anywhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment