Added Unit Tests & Logging
- Added own logger class that includes the module name - added unit tests for MessageHandler, Command and Answer - removed unit tests for GuildHandler and lib/cmd - removed old command templatespull/51/head
parent
6f890dacee
commit
e74fa83ed3
@ -1,109 +0,0 @@
|
||||
{
|
||||
"utils": {
|
||||
"help": {
|
||||
"name": "help",
|
||||
"permission": "all",
|
||||
"description": "Shows this help command.",
|
||||
"category": "Utility",
|
||||
"args": [
|
||||
"command"
|
||||
]
|
||||
},
|
||||
"say": {
|
||||
"name": "say",
|
||||
"permission": "all",
|
||||
"description": "Says something. ~say [String].",
|
||||
"category": "Utility"
|
||||
},
|
||||
"addpresence": {
|
||||
"name": "addpresence",
|
||||
"permission": "owner",
|
||||
"description": "Adds a presence to presences.",
|
||||
"category": "Utility"
|
||||
},
|
||||
"shutdown": {
|
||||
"name": "shutdown",
|
||||
"description": "Shuts the bot down.",
|
||||
"permission": "owner",
|
||||
"category": "Utility"
|
||||
},
|
||||
"rotate": {
|
||||
"name": "rotate",
|
||||
"description": "Forces a presence rotation",
|
||||
"permission": "owner",
|
||||
"category": "Utility"
|
||||
},
|
||||
"createUser": {
|
||||
"name": "createUser",
|
||||
"permission": "owner",
|
||||
"description": "Creates a new user for the webinterface.",
|
||||
"category": "Utility",
|
||||
"args": [
|
||||
"username",
|
||||
"password",
|
||||
"scope"
|
||||
]
|
||||
},
|
||||
"bugreport": {
|
||||
"name": "bug",
|
||||
"permission": "all",
|
||||
"description": "Get info about how to report a bug",
|
||||
"category": "Utility",
|
||||
"response": {
|
||||
"bug_report": "Please report your bugs [here](https://github.com/Trivernis/discordbot.js/issues)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
"about": {
|
||||
"name": "about",
|
||||
"permission": "all",
|
||||
"description": "Shows information about this bot.",
|
||||
"category": "Info",
|
||||
"response": {
|
||||
"about_icon": "This icon war created by [blackrose14344](https://www.deviantart.com/blackrose14344). \n [Original](https://www.deviantart.com/blackrose14344/art/2B-Chi-B-685771489)",
|
||||
"about_creator": "This bot was created by Trivernis. More about this bot [here](https://github.com/Trivernis/discordbot.js)."
|
||||
}
|
||||
},
|
||||
"ping": {
|
||||
"name": "ping",
|
||||
"permission": "owner",
|
||||
"description": "Answers with the current average ping of the bot.",
|
||||
"category": "Info"
|
||||
},
|
||||
"uptime": {
|
||||
"name": "uptime",
|
||||
"permission": "owner",
|
||||
"description": "Answers with the current uptime of the bot.",
|
||||
"category": "Info"
|
||||
},
|
||||
"guilds": {
|
||||
"name": "guilds",
|
||||
"permission": "owner",
|
||||
"description": "Answers with the number of guilds the bot has joined.",
|
||||
"category": "Info"
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"AniList": {
|
||||
"animeSearch": {
|
||||
"name": "anime",
|
||||
"permission": "all",
|
||||
"description": "Answers the anime found for that name on AniList.",
|
||||
"category": "AniList",
|
||||
"response": {
|
||||
"not_found": "The Anime was not found :("
|
||||
}
|
||||
},
|
||||
"mangaSearch": {
|
||||
"name": "manga",
|
||||
"permission": "all",
|
||||
"description": "Answers the manga found for that name on AniList.",
|
||||
"category": "AniList",
|
||||
"response": {
|
||||
"not_found": "The Manga was not found :("
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,203 +0,0 @@
|
||||
{
|
||||
"utils": {
|
||||
"roles": {
|
||||
"name": "roles",
|
||||
"permission": "all",
|
||||
"description": "Shows the roles used for commands on the server.",
|
||||
"category": "Utility"
|
||||
},
|
||||
"savecmd": {
|
||||
"name": "savecmd",
|
||||
"permission": "moderator",
|
||||
"description": "Saves a sequence of commands under a new name. ~save [cmdsequence] [cmdname]. Semicoli must be escaped with \\ (Backslash)",
|
||||
"category": "Utility",
|
||||
"response": {
|
||||
"no_recursion": "You are **not** allowed to execute another saved command in this sequence. This is a safety measure to avoid endlessly recursive calls.",
|
||||
"sequence_too_long": "This command sequence is too long!"
|
||||
}
|
||||
},
|
||||
"savedcmd": {
|
||||
"name": "savedcmd",
|
||||
"permission": "all",
|
||||
"description": "Displays the saved commands.",
|
||||
"category": "Utility",
|
||||
"response": {
|
||||
"no_commands": "There are no saved commands."
|
||||
}
|
||||
},
|
||||
"deletecmd": {
|
||||
"name": "deletecmd",
|
||||
"permission": "moderator",
|
||||
"description": "Delete a saved command.",
|
||||
"args": [
|
||||
"cmdname"
|
||||
],
|
||||
"category": "Utility"
|
||||
},
|
||||
"execute": {
|
||||
"name": "execute",
|
||||
"permission": "all",
|
||||
"args": [
|
||||
"cmdname"
|
||||
],
|
||||
"description": "Execute saved commands.",
|
||||
"category": "Utility",
|
||||
"response": {
|
||||
"not_found": "This command could not be found."
|
||||
}
|
||||
}
|
||||
},
|
||||
"music": {
|
||||
"play": {
|
||||
"name": "play",
|
||||
"permission": "all",
|
||||
"args": [
|
||||
"url"
|
||||
],
|
||||
"description": "Adds the url to the YouTube video/playlist into the queue.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "Added Song/Playlist to the queue.",
|
||||
"failure": "Failed adding Song/Playlist to the queue.",
|
||||
"url_invalid": "This is not a valid url!",
|
||||
"no_url": "I need an url to a video to play!",
|
||||
"no_voicechannel": "You need to join a voicechannel to do that!"
|
||||
}
|
||||
},
|
||||
"playnext": {
|
||||
"name": "playnext",
|
||||
"permission": "all",
|
||||
"args": [
|
||||
"url"
|
||||
],
|
||||
"description": "Adds the url to the YouTube video as next song to the queue.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "Added Song as next Song to the queue.",
|
||||
"failure": "Failed adding Song as next Song to the queue.",
|
||||
"url_invalid": "This is not a valid url!",
|
||||
"no_url": "I need an url to a video to play",
|
||||
"no_voicechannel": "You need to join a voicechannel to do that!"
|
||||
}
|
||||
},
|
||||
"join": {
|
||||
"name": "join",
|
||||
"permission": "all",
|
||||
"description": "Joins the VC you are in.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"not_connected": "You are not connected to a Voice Channel."
|
||||
}
|
||||
},
|
||||
"stop": {
|
||||
"name": "stop",
|
||||
"permission": "dj",
|
||||
"description": "Stops playing music and leaves.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "Stopping now...",
|
||||
"not_playing": "I'm not playing music at the moment."
|
||||
}
|
||||
},
|
||||
"pause": {
|
||||
"name": "pause",
|
||||
"permission": "all",
|
||||
"description": "Pauses playing.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "Pausing playback.",
|
||||
"not_playing": "I'm not playing music at the moment."
|
||||
}
|
||||
},
|
||||
"resume": {
|
||||
"name": "resume",
|
||||
"permission": "all",
|
||||
"description": "Resumes playing.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "Resuming playback.",
|
||||
"not_playing": "I'm not playing music at the moment."
|
||||
}
|
||||
},
|
||||
"skip": {
|
||||
"name": "skip",
|
||||
"permission": "dj",
|
||||
"description": "Skips the current song.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "Skipping to the next song.",
|
||||
"not_playing": "I'm not playing music at the moment."
|
||||
}
|
||||
},
|
||||
"clear": {
|
||||
"name": "clear",
|
||||
"permission": "dj",
|
||||
"description": "Clears the queue.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "The Queue has been cleared."
|
||||
}
|
||||
},
|
||||
"playlist": {
|
||||
"name": "queue",
|
||||
"permission": "all",
|
||||
"description": "Shows the next ten songs.",
|
||||
"category": "Music"
|
||||
},
|
||||
"current": {
|
||||
"name": "np",
|
||||
"permission": "all",
|
||||
"description": "Shows the currently playing song.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"not_playing": "I'm not playing music at the moment."
|
||||
}
|
||||
},
|
||||
"shuffle": {
|
||||
"name": "shuffle",
|
||||
"permission": "all",
|
||||
"description": "Shuffles the playlist.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"success": "The Queue has been shuffled."
|
||||
}
|
||||
},
|
||||
"repeat": {
|
||||
"name": "repeat",
|
||||
"permission": "all",
|
||||
"description": "Toggle listening on repeat.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"repeat_true": "Listening on repeat now!",
|
||||
"repeat_false": "Not listening on repeat anymore."
|
||||
}
|
||||
},
|
||||
"savemedia": {
|
||||
"name": "savemedia",
|
||||
"permission": "dj",
|
||||
"args": [
|
||||
"url"
|
||||
],
|
||||
"description": "Saves the YouTube song/playlist with a specific name",
|
||||
"category": "Music"
|
||||
},
|
||||
"savedmedia": {
|
||||
"name": "savedmedia",
|
||||
"permission": "all",
|
||||
"description": "Prints out all saved playlists and songs.",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"no_saved": "There are no saved songs/playlists :("
|
||||
}
|
||||
},
|
||||
"deletemedia": {
|
||||
"name": "deletemedia",
|
||||
"permission": "dj",
|
||||
"description": "Deletes a saved media entry. ~deletemedia [name]",
|
||||
"category": "Music",
|
||||
"response": {
|
||||
"no_name": "You must provide a name for the media that shall be deleted."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue