diff --git a/CHANGELOG.md b/CHANGELOG.md index a008d0b04a2cc407464d7017efe1adcda07e8d9f..add6d70f13fb235ac238d07163fb2424ecdfc712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [0.0.6](https://gitlab.utu.fi/jnkyto/ttl_proj/compare/v0.0.4...v0.0.6) (2023-04-25) +### [0.0.6](https://gitlab.utu.fi/jnkyto/ttl_proj/compare/v0.0.5...v0.0.6) (2023-04-25) +Toiminnallisuus suosikkiravintoloiden tallentamiseksi luotu. Botti lähettää joka päivä viestin sille määrätylle +kanavalle suosikkiravintoloiden ruokalistoista. ### [0.0.5](https://gitlab.utu.fi/jnkyto/ttl_proj/compare/v0.0.4...v0.0.5) (2023-04-24) Lisätty toiminnallisuus threadien luomiseen päivän ruokalistaa haettaessa. Botti pystyy lähettämään nyt ruokalistat viestinä. diff --git a/src/cmd/DebugCommand.ts b/src/cmd/DebugCommand.ts index b0f0e4ef181bbf342df642091edc679f51965299..c9810078c44471636d738ab46fd92a7a6e244338 100644 --- a/src/cmd/DebugCommand.ts +++ b/src/cmd/DebugCommand.ts @@ -26,7 +26,7 @@ const checkApiConnection = async () : Promise<string> => { }; export const DebugCommand : Command = { - description: "Debugging command", + description: "Debuggauskomento", name: "debug", type: 1, run: async(client: Client, interaction: CommandInteraction): Promise<void> => { diff --git a/src/cmd/FavoriteCommand.ts b/src/cmd/FavoriteCommand.ts index 0f84ecf8d7b6f341f89f116697c394631c9311f8..11ee3064bddb23bbaa10ec2d4662988cc8738510 100644 --- a/src/cmd/FavoriteCommand.ts +++ b/src/cmd/FavoriteCommand.ts @@ -9,12 +9,12 @@ import { getIdNamePairs } from "../utils/getIdNamePairs"; let command = { name: "favorite", - description: "used to manage favorites", + description: "Käytetään suosikkiravintoloiden hallintaan", type: 1, // CHAT_INPUT options: [ { name: "add", - description: "Add restaurant to favorites", + description: "Lisää ravintola suosikkeihin", type: 1, options: [ { @@ -28,12 +28,12 @@ let command = { }, { name: "remove", - description: "Remove restaurant from favorites", + description: "Poista ravintola suosikeista", type: 1, options: [ { name: "restaurant", - description: "ravintola", + description: "Ravintola", type: 3, required: true, choices: [] as RestaurantIdNamePair[] //fetched below with getIdnamePairs() @@ -54,11 +54,11 @@ let command = { switch (interaction.options.data[0].name) { case "add": addFavoriteToFile(restaurantEntryId, guild.id, "./data/favorites.json"); - message = "Restaurant added to favorites!"; + message = "Ravintola lisätty suosikkeihin!"; break; case "remove": removeFavoriteFromFile(restaurantEntryId, guild.id, "./data/favorites.json"); - message = "Restaurant removed from favorites!"; + message = "Ravintola poistettu suosikeista!"; break; default: // await interaction.followUp("Virheellinen alakomento. Ei oo mun vika bro."); diff --git a/src/cmd/InsultCommand.ts b/src/cmd/InsultCommand.ts index 30c667d793570d21c8b356a46a3cee5a49c1e733..30751ec4d6a67da0ab54c91ec266537fea316a85 100644 --- a/src/cmd/InsultCommand.ts +++ b/src/cmd/InsultCommand.ts @@ -4,7 +4,7 @@ import {Command} from "../interfaces/Command"; import {getRandomInt} from "../utils/getRandomInt"; let insults = [ - "The insults.json file was not found. Check if it exists in the /data/-folder, dumbass. Regards, Gordon" + "The insults.json file was not found. Check if it exists in the /data/-folder, dumbass. Regards, Gordon." ]; try { diff --git a/src/cmd/MenuCommand.ts b/src/cmd/MenuCommand.ts index 617cf1fb104593ea4f00418f695b4e8822103fbf..b4db1802e0cf382ab0462912f0c4bb6bab8c4244 100644 --- a/src/cmd/MenuCommand.ts +++ b/src/cmd/MenuCommand.ts @@ -109,12 +109,12 @@ let command = { if(messages[messageIndex].length + daymenu.length <= 2000){ messages[messageIndex] += daymenu; } else { - console.log(messages[messageIndex]); + console.debug(messages[messageIndex]); interaction.followUp(messages[messageIndex]); messages[++messageIndex] = `Vastauksen osa ${messageIndex + 1} (Discord-viestin enimmäismerkkimäärä ylitetty)\n` + daymenu; } } - console.log(messages[messageIndex]); + console.debug(messages[messageIndex]); interaction.followUp(messages[messageIndex]); }) .catch(e => { diff --git a/src/listeners/InteractionCreate.ts b/src/listeners/InteractionCreate.ts index 1c59395daf7574133367c9dfa3db455e318ee2f5..448a1b66570f2ab598230d2eb8d45ce0e2e9b01a 100644 --- a/src/listeners/InteractionCreate.ts +++ b/src/listeners/InteractionCreate.ts @@ -12,7 +12,7 @@ export default (client: Client): void => { const handleSlashCommand = async (client: Client, interaction: CommandInteraction): Promise<void> => { const slashCommand = getCommands().find(cmd => cmd.name === interaction.commandName); if (!slashCommand) { - await interaction.followUp({content: "An oopsie woopsie has occurred!"}); + await interaction.followUp({content: "Odottamaton virhe tapahtui. Hups!"}); return; } await interaction.deferReply();