Skip to content
This repository has been archived by the owner on Jan 19, 2025. It is now read-only.

attempted to improve command organization #1236

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ typings/

src/locales/*
!src/locales/en-US/

# yucky macOS garbage files
.DS_Store
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class CreateEmoji extends Command {
super({
name: 'createemoji',
aliases: ['newemoji'],
category: 'utility',
category: 'bot',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
requirements: { guildOnly: true, permissions: ['MANAGE_EMOJIS'], botPermissions: ['MANAGE_EMOJIS'] },
parameters: [{
type: 'url',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class DeleteEmoji extends Command {
super({
name: 'deleteemoji',
aliases: ['delemoji'],
category: 'utility',
category: 'bot',
requirements: { guildOnly: true, permissions: ['MANAGE_EMOJIS'], botPermissions: ['MANAGE_EMOJIS'] },
parameters: [{
type: 'emoji',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class GuildIcon extends Command {
super({
name: 'guildicon',
aliases: ['gicon', 'sicon', 'srvicn', 'servericon'],
category: 'utility',
category: 'bot',
requirements: { guildOnly: true },
parameters: [{
type: 'guild',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class GuildInfo extends Command {
super({
name: 'guildinfo',
aliases: ['serverinfo', 'server', 'guild', 'si', 'gi', 'sinfo', 'ginfo'],
category: 'utility',
category: 'bot',
requirements: { guildOnly: true },
parameters: [{
type: 'guild',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Profile extends Command {
constructor (client) {
super({
name: 'profile',
category: 'social',
category: 'bot',
requirements: { databaseOnly: true, canvasOnly: true },
parameters: [{
type: 'user',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class RoleInfo extends Command {
super({
name: 'roleinfo',
aliases: ['rolinfo', 'rol', 'ri', 'roli'],
category: 'utility',
category: 'bot',
requirements: { guildOnly: true },
parameters: [{
type: 'role',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class StopTyping extends Command {
super({
name: 'stoptyping',
aliases: ['st'],
category: 'utility'
category: 'bot'
}, client)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class UserInfo extends Command {
super({
name: 'userinfo',
aliases: ['user', 'ui', 'uinfo'],
category: 'utility',
category: 'bot',
requirements: { guildOnly: true },
parameters: [{
type: 'member',
Expand Down
1 change: 1 addition & 0 deletions src/commands/configuration/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = class ConfigLanguage extends Command {
super({
name: 'language',
aliases: ['lang'],
category: 'configuration',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
parent: 'config',
parameters: [{
type: 'string',
Expand Down
1 change: 1 addition & 0 deletions src/commands/configuration/prefix.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = class ConfigPrefix extends Command {
constructor (client) {
super({
name: 'prefix',
category: 'configuration',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
parent: 'config',
parameters: [{
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Currency extends Command {
super({
name: 'currency',
aliases: ['currencyconverter', 'converter'],
category: 'utility',
category: 'economy',
requirements: { envVars: ['KSOFT_KEY'] },
parameters: [{
type: 'string',
Expand Down
1 change: 1 addition & 0 deletions src/commands/games/chorus.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = class Chorus extends SearchCommand {
super({
name: 'chorus',
aliases: ['clonehero', 'chart'],
category: 'games',
requirements: {
apis: ['chorus']
},
Expand Down
1 change: 0 additions & 1 deletion src/commands/games/leagueoflegends/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = class LeagueOfLegendsStatus extends Command {
name: 'status',
aliases: ['s'],
parent: 'leagueoflegends',
category: 'games',
parameters: [{
type: 'string',
whitelist: servers,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gifs/handshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = class Handshake extends Command {
super({
name: 'handshake',
aliases: ['hs', 'hands'],
category: 'images',
category: 'gifs',
parameters: [{
type: 'user', acceptBot: true, acceptSelf: false, missingError: 'commands:handshake.noMention'
}]
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gifs/hug.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Hug extends Command {
constructor (client) {
super({
name: 'hug',
category: 'images',
category: 'gifs',
parameters: [{
type: 'user', acceptBot: true, acceptSelf: false, missingError: 'commands:hug.noMention'
}]
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gifs/kiss.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class Kiss extends Command {
super({
name: 'kiss',
aliases: ['beijo', 'beijar'],
category: 'images',
category: 'gifs',
parameters: [{
type: 'user', acceptBot: true, acceptSelf: false, missingError: 'commands:kiss.noMention'
}]
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gifs/pat.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Pat extends Command {
constructor (client) {
super({
name: 'pat',
category: 'images',
category: 'gifs',
parameters: [{
type: 'user', acceptBot: true, acceptSelf: false, missingError: 'commands:pat.noMention'
}]
Expand Down
2 changes: 1 addition & 1 deletion src/commands/gifs/slap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Slap extends Command {
constructor (client) {
super({
name: 'slap',
category: 'images',
category: 'gifs',
parameters: [{
type: 'user', acceptBot: true, acceptSelf: false, missingError: 'commands:slap.noMention'
}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class Triggered extends Command {
super({
name: 'triggered',
aliases: ['trigger', 'puto'],
category: 'images',
category: 'gifs',
requirements: { canvasOnly: true },
parameters: [{
type: 'image',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = class Emoji extends Command {
super({
name: 'emoji',
aliases: ['enlarge', 'bigemoji'],
category: 'image-manipulation',
parameters: [{
type: 'emoji', full: true
}]
Expand Down
2 changes: 1 addition & 1 deletion src/commands/image-manipulation/presidentialalert.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class PresidentialAlert extends Command {
super({
name: 'presidentialalert',
aliases: ['pa'],
category: 'images',
category: 'image-manipulation',
requirements: { canvasOnly: true },
parameters: [{
type: 'string', full: true, required: true, missingError: 'commands:presidentialalert.missingText'
Expand Down
2 changes: 1 addition & 1 deletion src/commands/memes/quieres.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class Quieres extends Command {
super({
name: 'quieres',
aliases: ['bufa'],
category: 'images',
category: 'memes',
requirements: { canvasOnly: true },
parameters: [{
type: 'image',
Expand Down
1 change: 1 addition & 0 deletions src/commands/misc/8ball.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = class EightBall extends Command {
super({
name: '8ball',
aliases: ['eightball', '8b', 'magicball', '8-ball'],
category: 'misc',
parameters: [{
type: 'string', full: true, missingError: 'commands:8ball.noQuestion'
}]
Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/adorable.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const { Command, SwitchbladeEmbed } = require('../../')
module.exports = class Adorable extends Command {
constructor (client) {
super({
name: 'adorable'
name: 'adorable',
category: 'misc'
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
}, client)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/dog.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Dog extends Command {
super({
name: 'dog',
aliases: ['doggo', 'dogpics', 'randomdog'],
category: 'general'
category: 'misc'
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
}, client)
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/fox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const fetch = require('node-fetch')
module.exports = class Fox extends Command {
constructor (client) {
super({
name: 'fox'
name: 'fox',
category: 'misc'
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
}, client)
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/geekjokes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = class GeekJokes extends Command {
constructor (client) {
super({
name: 'geekjokes',
aliases: ['geek', 'geekjoke', 'geekj']
aliases: ['geek', 'geekjoke', 'geekj'],
category: 'misc'
}, client)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/goat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Goat extends Command {
super({
name: 'goat',
aliases: ['placegoat'],
category: 'general',
category: 'misc',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
parameters: [{
type: 'number',
required: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = class Holidays extends Command {
constructor (client) {
super({
name: 'holidays',
category: 'utility',
category: 'misc',
parameters: [{
type: 'string',
whitelist: supportedCountries,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/httpcat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class HttpCat extends Command {
constructor (client) {
super({
name: 'httpcat',
category: 'general',
category: 'misc',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
parameters: [{
type: 'number',
required: false
Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/httpdog.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class HttpDog extends Command {
constructor (client) {
super({
name: 'httpdog',
category: 'general',
category: 'misc',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
parameters: [{
type: 'number',
required: false
Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/imageoftheday.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = class ImageOfTheDay extends Command {
constructor (client) {
super({
name: 'imageoftheday',
aliases: ['iotd']
aliases: ['iotd'],
category: 'misc'
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
}, client)
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/inspirobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = class InspiroBot extends Command {
constructor (client) {
super({
name: 'inspirobot',
aliases: ['inspiro', 'ibot']
aliases: ['inspiro', 'ibot'],
category: 'misc'
}, client)
}

Expand Down
1 change: 1 addition & 0 deletions src/commands/misc/numberfacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = class NumberFacts extends Command {
super({
name: 'numberfacts',
aliases: ['number', 'numfacts', 'numf'],
category: 'misc',
parameters: [{
type: 'number', min: 0, missingError: 'commands:numberfacts.validNumber'
}]
Expand Down
1 change: 1 addition & 0 deletions src/commands/misc/pusheen.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = class Pusheen extends Command {
constructor (client) {
super({
name: 'pusheen',
category: 'misc',
requirements: { apis: ['tumblr'] }
}, client)
}
Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/shiba.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = class Shiba extends Command {
constructor (client) {
super({
name: 'shiba',
aliases: ['shibainu', 'doge']
aliases: ['shibainu', 'doge'],
category: 'misc'
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
}, client)
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/uigradient.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = class UIGradient extends Command {
constructor (client) {
super({
name: 'uigradient',
aliases: ['rg', 'randomgradient']
aliases: ['rg', 'randomgradient'],
category: 'misc'
}, client)
}

Expand Down
1 change: 1 addition & 0 deletions src/commands/misc/xkcd.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = class XKCD extends Command {
constructor (client) {
super({
name: 'xkcd',
category: 'misc',
parameters: [{
type: 'string', full: true, required: false
}]
Expand Down
1 change: 1 addition & 0 deletions src/commands/misc/xkcd37.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = class XKCD37 extends Command {
constructor (client) {
super({
name: 'xkcd37',
category: 'misc',
parameters: [{
type: 'string', full: true
}]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class BlacklistCommand extends Command {
constructor (client) {
super({
name: 'blacklist',
category: 'developers',
category: 'moderation',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
hidden: true,
requirements: { devOnly: true },
parameters: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class RestrictEmoji extends Command {
constructor (client) {
super({
name: 'restrictemoji',
category: 'utility',
category: 'moderation',
requirements: {
guildOnly: true,
botPermissions: ['MANAGE_EMOJIS'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class Unblacklist extends Command {
constructor (client) {
super({
name: 'unblacklist',
category: 'developers',
category: 'moderation',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
hidden: true,
requirements: { devOnly: true },
parameters: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class WhyBlacklisted extends Command {
constructor (client) {
super({
name: 'whyblacklisted',
category: 'developers',
category: 'moderation',
CamHardy marked this conversation as resolved.
Show resolved Hide resolved
hidden: true,
requirements: { devOnly: true },
parameters: [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = class Deezer extends SubcommandListCommand {
super({
name: 'deezer',
aliases: ['dz'],
category: 'music',
requirements: { apis: ['deezer'] },
authorString: 'commands:deezer.serviceName',
authorImage: 'https://lh3.googleusercontent.com/r55K1eQcji3QMHRKERq6zE1-csoh_MTOHiKyHTuTOblhFi_rIz06_8GN5-DHUGJOpn79',
Expand Down
Loading