Skip to content

Commit

Permalink
[Enhancement] Changed the deploy command export statement, added more…
Browse files Browse the repository at this point in the history
… docs for the custom modules
  • Loading branch information
naseif committed Oct 1, 2021
1 parent 012f236 commit 4042978
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
6 changes: 2 additions & 4 deletions deploy-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ for (const folder of commandFolders) {
}
}

async function registerSlashCommands(clientId, guildId) {
module.exports.registerSlashCommands = async (clientId, guildId) => {
try {
await rest.put(Routes.applicationGuildCommands(clientId, guildId), {
body: commands,
Expand All @@ -27,6 +27,4 @@ async function registerSlashCommands(clientId, guildId) {
} catch (error) {
console.error(error);
}
}

module.exports = { registerSlashCommands };
};
3 changes: 2 additions & 1 deletion modules/commandsReadMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const mdtable = require("mdtable");
const { writeFileSync } = require("fs");

/**
*
* Creats a MD Table for github
* @param {array} commands
* @returns New File containng the commands table
*/

module.exports.commandsReadMe = (commands) => {
Expand Down
4 changes: 2 additions & 2 deletions modules/embedSimple.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
*
* Simple function for embed messages
* @param {string} color
* @param {string} description
* @returns
* @returns Object Containing the new Embed
*/

module.exports.embedMessage = (color, description) => {
Expand Down
4 changes: 2 additions & 2 deletions modules/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ const moment = require("moment");
const chalk = require("chalk");

/**
*
* Logger for debugging purposes
* @param {string} message
* @param {string} type
* @returns
* @returns ""
*/

module.exports.logger = (message, type = "log") => {
Expand Down
4 changes: 2 additions & 2 deletions modules/mstoTime.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
*
* Converts MS to HMS Format
* @param {number} duration
* @returns
* @returns Time in HMS Format
*/
module.exports.msToTime = (duration) => {
let milliseconds = parseInt((duration % 1000) / 100),
Expand Down
4 changes: 2 additions & 2 deletions modules/requestAPI.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const fetch = require("node-fetch");

/**
*
* Performs a simple GET request
* @param {string} url
* @returns
* @returns Response from the API as JSON
*/

module.exports.requestAPI = async (url) => {
Expand Down

0 comments on commit 4042978

Please sign in to comment.