This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name":"about", | |
"description":"View information and stats about the bot.", | |
"options":null | |
}, | |
{ | |
"name":"ban", | |
"description":"Ban a user from the server.", | |
"options":[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "purge", | |
description: "Bulk-delete the specified amount of messages.", | |
permissionLevel: 1, | |
options: [ | |
{ | |
"type": 4, | |
"name": "amount", | |
"description": "Amount of messages to delete", | |
"default": false, | |
"required": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "mute", | |
description: "Mute a member in the server.", | |
permissionLevel: 1, | |
options: [ | |
{ | |
"type": 6, | |
"name": "user", | |
"description": "User to mute", | |
"default": false, | |
"required": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Client, Collection } from "discord.js"; | |
import { walk } from "../functions/fswalk"; | |
const ignoreFiles = file => { | |
const [str] = file.match(/[^/\\]*?.js/) ?? []; | |
return /^[^_].*?\.js$/.test(str); | |
}; | |
const commands = walk("./commands/", ignoreFiles); | |
const events = walk("./events/", ignoreFiles); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Client, Collection } from "discord.js"; | |
export class Command { | |
constructor(public client: Client, options) { | |
this.client = client; | |
this.help = { | |
name: options.name || null, | |
description: options.description || "No information specified.", | |
usage: options.usage || [], |