From 06d43edf37d379a0cdd4ffd076e89195ea27d030 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joona=20Kyt=C3=B6niemi?= <jnkyto@utu.fi>
Date: Tue, 25 Apr 2023 21:07:24 +0300
Subject: [PATCH] =?UTF-8?q?K=C3=A4=C3=A4nn=C3=B6ksi=C3=A4,=20botti=20toivo?=
 =?UTF-8?q?ttavasti=20esittelyvalmis?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 CHANGELOG.md                       |  4 +++-
 src/cmd/DebugCommand.ts            |  2 +-
 src/cmd/FavoriteCommand.ts         | 12 ++++++------
 src/cmd/InsultCommand.ts           |  2 +-
 src/cmd/MenuCommand.ts             |  4 ++--
 src/listeners/InteractionCreate.ts |  2 +-
 6 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a008d0b..add6d70 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 b0f0e4e..c981007 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 0f84ecf..11ee306 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 30c667d..30751ec 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 617cf1f..b4db180 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 1c59395..448a1b6 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();
-- 
GitLab