This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* toHex(inputNumber) | |
* | |
* @param {number} inputNumber | |
* @return {string} hash | |
* | |
* @example | |
* | |
* toHex(394540642987933707 + Date.now()) | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* COMMAND CONFIG: | |
* | |
* name: String Command Name | |
* aliases: Array Alias for this command in case user doesn't know how to spell. Leave empty array if no alias is needed. | |
* des: String Short description for this command. No paragraphs! | |
* usage: String If command has any paramaters. Leave 1 space if no usage needed. Do not type the command name either! <> = required () = optional | |
* guildOnly: Boolean If command can be run in dm or guild. Default: true | |
* ownerOnly: Boolean If command is owner only. Deafault: false | |
* permLevel: Array The permissions the guildMember must have to run this command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> ** Month, Year ** | |
( Post Patch Notes For: ` 0.0.00.000 ` ) | |
** Bug Fixes ** | |
✅ • Bug Fix Here | |
✅ • Bug Fix Here | |
✅ • Bug Fix Here | |
** Changes ** | |
✅ • Changes Done Here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a short id from a string of numbers. | |
* | |
* @param {String} inputNumber The number to hash | |
* @return {String} hash The hashed string | |
*/ | |
module.exports = (inputNumber) => { | |
let hash = ''; | |
const alphabet = '23456789abcdefghijklmnopqrstuvwxyz'; | |
const length = alphabet.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Round a number to a given decimal point. | |
* | |
* @function preciseRound | |
* | |
* @param {Number} value The number to be rounded. | |
* @param {Number} decimals=1 The decimal places to round to (defaults to 1). | |
* @returns {Number} rounded The final rounded number. | |
* @example | |
* preciseRound(196.2000702, 1) => 196.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* main express file: app.js */ | |
const express = require('express') | |
const app = express() | |
// other middleware | |
require('./routes')(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @function randomInt | |
* @description Generate A Random Number Withing A Range But Exclude A Subset Of Numbers | |
* | |
* @param {Number} min Minumum Number | |
* @param {Number} max Maximum Number | |
* @param {Array<Number>} exclude Array Of Numbers To Exclude | |
* @returns {Number} | |
* @example randomInt(2, 10, [3, 5, 7]) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Import getPlace function **/ | |
const { getPlace } = require('someFilePath...') | |
/** | |
* @function getData | |
* @description requires object of { placeName: placeId }, fetches game player stats and sets | |
* discord voice channel name to placeName: amountOfPlayers | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-param-reassign */ | |
/** | |
* Creates a short unique id from a string of numbers. | |
* | |
* @param {String} inputNumber The number to hash | |
* @return {String} hash The hashed string | |
*/ | |
module.exports = (inputNumber) => { |
OlderNewer