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 all 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 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 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
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: 'image'
}, client)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/dog.js → src/commands/image/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: 'image'
}, client)
}

Expand Down
3 changes: 2 additions & 1 deletion src/commands/misc/fox.js → src/commands/image/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: 'image'
}, client)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/goat.js → src/commands/image/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: 'image',
parameters: [{
type: 'number',
required: false
Expand Down
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: 'image'
}, client)
}

Expand Down
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: 'image'
}, client)
}

Expand Down
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: 'memes',
parameters: [{
type: 'number',
required: false
Expand Down
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: 'memes',
parameters: [{
type: 'number',
required: false
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/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
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
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/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 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 @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = class LastFM extends SubcommandListCommand {
super({
name: 'lastfm',
aliases: ['lfm'],
category: 'music',
requirements: { apis: ['lastfm'] },
authorString: 'commands:lastfm.serviceName',
authorImage: 'https://c7.uihere.com/files/934/662/527/last-fm-logo-computer-icons-music-recommender-system-icon-free-image-lastfm-thumb.jpg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = class Spotify extends SubcommandListCommand {
super({
name: 'spotify',
aliases: ['sp'],
category: 'music',
requirements: { apis: ['spotify'] },
authorString: 'commands:spotify.serviceName',
authorImage: 'https://i.imgur.com/vw8svty.png',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Bassboost extends Command {
super({
name: 'bassboost',
aliases: ['bass', 'earrape'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, guildPlaying: true }
}, client)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Loop extends Command {
super({
name: 'loop',
aliases: ['repeat'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, guildPlaying: true }
}, client)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = class NowPlaying extends Command {
super({
name: 'nowplaying',
aliases: ['np', 'currentplaying'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, guildPlaying: true },
parameters: [[{
type: 'booleanFlag', name: 'text'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Pause extends Command {
super({
name: 'pause',
aliases: ['resume'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, guildPlaying: true }
}, client)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class Play extends Command {
super({
name: 'play',
aliases: ['p'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, voiceChannelOnly: true, playerManagerOnly: true },
parameters: [{
type: 'string', full: true, missingError: 'commands:play.noTrackIdentifier'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class Queue extends Command {
super({
name: 'queue',
aliases: ['playlist'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, guildPlaying: true }
}, client)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Seek extends Command {
constructor (client) {
super({
name: 'seek',
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, guildPlaying: true },
parameters: [{
type: TargetParameter, full: true, missingError: 'commands:seek.missingSeekParameter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = class Skip extends Command {
super({
name: 'skip',
aliases: ['next'],
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, guildPlaying: true }
}, client)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = class Stop extends Command {
constructor (client) {
super({
name: 'stop',
category: 'music',
category: 'musicplayer',
requirements: { guildOnly: true, sameVoiceChannelOnly: true, guildPlaying: true, permissions: ['MANAGE_GUILD'] }
}, client)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = class Volume extends Command {
super({
name: 'volume',
aliases: ['vol'],
category: 'music',
category: 'musicplayer',
requirements: {
guildOnly: true,
sameVoiceChannelOnly: true,
Expand Down
Loading