Skip to content

Instantly share code, notes, and snippets.

View 5factor's full-sized avatar
🎯
Focusing

factor 5factor

🎯
Focusing
View GitHub Profile
[
{
"name":"about",
"description":"View information and stats about the bot.",
"options":null
},
{
"name":"ban",
"description":"Ban a user from the server.",
"options":[
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
name: "mute",
description: "Mute a member in the server.",
permissionLevel: 1,
options: [
{
"type": 6,
"name": "user",
"description": "User to mute",
"default": false,
"required": true
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);
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 || [],