Skip to content

Commit

Permalink
fix the messsage typo in env variable errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Supinic committed Sep 24, 2024
1 parent e2ff758 commit 463a225
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion commands/check/subcommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ module.exports = (command) => [
execute: async () => {
if (!process.env.API_DEEPL_KEY) {
throw new sb.Error({
messsage: "No DeepL key configured (API_DEEPL_KEY)"
message: "No DeepL key configured (API_DEEPL_KEY)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/crypto/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
Code: (async function crypto (context, symbol = "BTC") {
if (!process.env.API_CRYPTO_COMPARE) {
throw new sb.Error({
messsage: "No CryptoCompare key configured (API_CRYPTO_COMPARE)"
message: "No CryptoCompare key configured (API_CRYPTO_COMPARE)"
});
}

Expand Down
4 changes: 2 additions & 2 deletions commands/cryptogame/update-prices-cron.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const cryptoGamePriceUpdate = async () => {
if (!process.env.API_CRYPTO_COMPARE) {
throw new sb.Error({
messsage: "No CryptoCompare key configured (API_CRYPTO_COMPARE)"
message: "No CryptoCompare key configured (API_CRYPTO_COMPARE)"
});
}
if (!process.env.API_FIXER_IO) {
throw new sb.Error({
messsage: "No FixerIO key configured (API_FIXER_IO)"
message: "No FixerIO key configured (API_FIXER_IO)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/cryptowallet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
Code: (async function cryptoWallet (context, address) {
if (!process.env.API_CRYPTO_COMPARE) {
throw new sb.Error({
messsage: "No CryptoCompare key configured (API_CRYPTO_COMPARE)"
message: "No CryptoCompare key configured (API_CRYPTO_COMPARE)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/currency/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
Code: (async function currency (context, ...args) {
if (!process.env.API_OPEN_EXCHANGE_RATES) {
throw new sb.Error({
messsage: "No OpenExchangeRates key configured (API_OPEN_EXCHANGE_RATES)"
message: "No OpenExchangeRates key configured (API_OPEN_EXCHANGE_RATES)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/dayoftheyear/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
Code: (async function percent (context, ...args) {
if (!process.env.API_DAYS_OF_THE_YEAR) {
throw new sb.Error({
messsage: "No DaysOfTheYear key configured (API_DAYS_OF_THE_YEAR)"
message: "No DaysOfTheYear key configured (API_DAYS_OF_THE_YEAR)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/faceit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
Code: (async function faceit (context, subcommandName, ...args) {
if (!process.env.API_FACEIT_KEY) {
throw new sb.Error({
messsage: "No FaceIt key configured (API_FACEIT_KEY)"
message: "No FaceIt key configured (API_FACEIT_KEY)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/gpt/gpt-deepinfra.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = class GptDeepInfra extends GptOpenAI {
static async execute (context, query, modelData) {
if (!process.env.API_KEY_DEEPINFRA) {
throw new sb.Error({
messsage: "No DeepInfra key configured (API_KEY_DEEPINFRA)"
message: "No DeepInfra key configured (API_KEY_DEEPINFRA)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/gpt/gpt-openai.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = class GptOpenAI extends Template {
static async execute (context, query, modelData) {
if (!process.env.API_OPENAI_KEY) {
throw new sb.Error({
messsage: "No OpenAI key configured (API_OPENAI_KEY)"
message: "No OpenAI key configured (API_OPENAI_KEY)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/gpt/moderation.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const check = async (context, text) => {
if (!process.env.API_OPENAI_KEY) {
throw new sb.Error({
messsage: "No OpenAI key configured (API_OPENAI_KEY)"
message: "No OpenAI key configured (API_OPENAI_KEY)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/moba/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = {
const hasEnvs = game.requiredEnvs.every(key => process.env[key]);
if (!hasEnvs) {
throw new sb.Error({
messsage: `Missing key(s) for ${context.invocation} (${game.requiredEnvs.join(", ")})`
message: `Missing key(s) for ${context.invocation} (${game.requiredEnvs.join(", ")})`
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/nutrients/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
Code: (async function nutrients (context, ...args) {
if (!process.env.API_NUTRITIONIX || !process.env.API_NUTRITIONIX_APP_ID) {
throw new sb.Error({
messsage: "No Nutritionix key/AppID configured (API_NUTRITIONIX, API_NUTRITIONIX_APP_ID)"
message: "No Nutritionix key/AppID configured (API_NUTRITIONIX, API_NUTRITIONIX_APP_ID)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/ocr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
Code: (async function ocr (context, ...args) {
if (!process.env.API_OCR_SPACE) {
throw new sb.Error({
messsage: "No OCR Space key configured (API_OCR_SPACE)"
message: "No OCR Space key configured (API_OCR_SPACE)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/query/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
Code: (async function query (context, ...args) {
if (!process.env.API_WOLFRAM_ALPHA_APPID) {
throw new sb.Error({
messsage: "No Wolfram Alpha AppID configured (API_WOLFRAM_ALPHA_APPID)"
message: "No Wolfram Alpha AppID configured (API_WOLFRAM_ALPHA_APPID)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/randomuploadervideo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
Code: (async function randomUploaderVideo (context, ...args) {
if (!process.env.API_GOOGLE_YOUTUBE) {
throw new sb.Error({
messsage: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
message: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/songrequest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const REQUEST_AMOUNT_LIMIT = 10;
const fetchVimeoData = async (query) => {
if (!process.env.API_VIMEO_KEY) {
throw new sb.Error({
messsage: "No Vimeo key configured (API_VIMEO_KEY)"
message: "No Vimeo key configured (API_VIMEO_KEY)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/steamgameplayers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = {
Code: async function steamGamePlayers (context, ...args) {
if (!process.env.API_CRYPTO_COMPARE) {
throw new sb.Error({
messsage: "No Steam key configured (API_STEAM_KEY)"
message: "No Steam key configured (API_STEAM_KEY)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/stock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
Code: (async function stock (context, ...args) {
if (!process.env.API_ALPHA_VANTAGE) {
throw new sb.Error({
messsage: "No AlphaVantage key configured (API_ALPHA_VANTAGE)"
message: "No AlphaVantage key configured (API_ALPHA_VANTAGE)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/streaminfo/youtube-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const channelRegex = /^UC\w{22}$/;
module.exports = async function youtubeStreamInfoHandler (context) {
if (!process.env.API_GOOGLE_YOUTUBE) {
throw new sb.Error({
messsage: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
message: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
});
}

Expand Down
4 changes: 2 additions & 2 deletions commands/time/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ module.exports = {
Code: (async function time (context, ...args) {
if (!process.env.API_GOOGLE_GEOCODING) {
throw new sb.Error({
messsage: "No Google geocoding API key configured (API_GOOGLE_GEOCODING)"
message: "No Google geocoding API key configured (API_GOOGLE_GEOCODING)"
});
}
if (!process.env.API_GOOGLE_TIMEZONE) {
throw new sb.Error({
messsage: "No Google timezone API key configured (API_GOOGLE_TIMEZONE)"
message: "No Google timezone API key configured (API_GOOGLE_TIMEZONE)"
});
}

Expand Down
2 changes: 1 addition & 1 deletion commands/translate/deepl.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const formalitySupportedLanguages = [
const execute = async function (context, query) {
if (!process.env.API_DEEPL_KEY) {
throw new sb.Error({
messsage: "No DeepL key configured (API_DEEPL_KEY)"
message: "No DeepL key configured (API_DEEPL_KEY)"
});
}

Expand Down
4 changes: 2 additions & 2 deletions commands/weather/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ module.exports = {
Code: (async function weather (context, ...args) {
if (!process.env.API_GOOGLE_GEOCODING) {
throw new sb.Error({
messsage: "No Google geocoding key configured (API_GOOGLE_GEOCODING)"
message: "No Google geocoding key configured (API_GOOGLE_GEOCODING)"
});
}
if (!process.env.API_OPEN_WEATHER_MAP) {
throw new sb.Error({
messsage: "No OpenWeatherMap key configured (API_OPEN_WEATHER_MAP)"
message: "No OpenWeatherMap key configured (API_OPEN_WEATHER_MAP)"
});
}

Expand Down
10 changes: 5 additions & 5 deletions utils/command-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports = {
async fetchTimeData (data = {}) {
if (!process.env.API_GOOGLE_TIMEZONE) {
throw new sb.Error({
messsage: "No Google timezone API key configured (API_GOOGLE_TIMEZONE)"
message: "No Google timezone API key configured (API_GOOGLE_TIMEZONE)"
});
}

Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = {
async checkPictureNSFW (link) {
if (!process.env.API_DEEP_AI) {
throw new sb.Error({
messsage: "No DeepAI key configured (API_DEEP_AI)"
message: "No DeepAI key configured (API_DEEP_AI)"
});
}

Expand Down Expand Up @@ -244,7 +244,7 @@ module.exports = {
async fetchGeoLocationData (query) {
if (!process.env.API_GOOGLE_GEOCODING) {
throw new sb.Error({
messsage: "No Google geolocation API key configured (API_GOOGLE_GEOCODING)"
message: "No Google geolocation API key configured (API_GOOGLE_GEOCODING)"
});
}

Expand Down Expand Up @@ -300,7 +300,7 @@ module.exports = {
async searchYoutube (query, options = {}) {
if (!process.env.API_GOOGLE_YOUTUBE) {
throw new sb.Error({
messsage: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
message: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
});
}

Expand Down Expand Up @@ -354,7 +354,7 @@ module.exports = {
async fetchYoutubePlaylist (options = {}) {
if (!process.env.API_GOOGLE_YOUTUBE) {
throw new sb.Error({
messsage: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
message: "No YouTube API key configured (API_GOOGLE_YOUTUBE)"
});
}

Expand Down

0 comments on commit 463a225

Please sign in to comment.