From c48f7b9060037014493113f00a500356285d975f Mon Sep 17 00:00:00 2001
From: 7cc5c4f330d47060 <samsungipadistaken@outlook.com>
Date: Fri, 21 Feb 2025 19:02:14 -0500
Subject: [PATCH] Updates to about command

---
 commands/about.js   | 51 ++++++++++++++++++++++++---------------------
 settings_example.js |  1 +
 version.js          |  1 -
 3 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/commands/about.js b/commands/about.js
index 742f5ce..dee4f04 100644
--- a/commands/about.js
+++ b/commands/about.js
@@ -13,6 +13,7 @@ import { readdirSync, readFileSync } from 'node:fs'
 import botVersion from '../util/version.js'
 import version from '../version.js'
 import { bots } from '../index.js'
+import settings from '../settings.js'
 
 const aboutBot = c => {
   c.reply({
@@ -36,34 +37,11 @@ const aboutBot = c => {
     })
   }
   c.reply({ text: '' })
-  if(version.officialUbot){
+  if(settings.officialUbot){
     c.reply({
       text: getMessage(c.lang, 'command.about.license'),
       color: c.colors.secondary
     })
-    c.reply({
-      translate: getMessage(c.lang, 'command.about.sourceCode'),
-      color: c.colors.secondary,
-      with: [
-        {
-          text: version.sourceURL,
-          color: c.colors.primary,
-          clickEvent: {
-            action: 'open_url',
-            value: version.sourceURL
-          },
-          hoverEvent: {
-            action: 'show_text',
-            contents: {
-              text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
-            },
-            value: { // Added twice for backwards compatibility
-              text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
-            }
-          }
-        }
-      ]
-    })
   } else {
     c.reply({
       translate: getMessage(c.lang, 'command.about.fork'),
@@ -97,6 +75,31 @@ const aboutBot = c => {
       ]
     })
   }
+  if(version.sourceURL){
+    c.reply({
+      translate: getMessage(c.lang, 'command.about.sourceCode'),
+      color: c.colors.secondary,
+      with: [
+        {
+          text: version.sourceURL,
+          color: c.colors.primary,
+          clickEvent: {
+            action: 'open_url',
+            value: version.sourceURL
+          },
+          hoverEvent: {
+            action: 'show_text',
+            contents: {
+              text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
+            },
+            value: { // Added twice for backwards compatibility
+              text: getMessage(c.lang, 'command.about.sourceCode.openInBrowser')
+            }
+          }
+        }
+      ]
+    })
+  }
   c.reply({ text: '' })
   c.reply({
     text: getMessage(c.lang, 'command.about.subcommands'),
diff --git a/settings_example.js b/settings_example.js
index d589548..8af404f 100644
--- a/settings_example.js
+++ b/settings_example.js
@@ -17,6 +17,7 @@ export default {
     'es"',
     'd"'
   ],
+  officialUbot: false // Used in production to show correct information in about command. If you set this to true, or otherwise remove the check, please ensure that you still comply with the license
   servers: [ // Server list
     {
       host: 'kaboom.pw', // Server address
diff --git a/version.js b/version.js
index 2cf8252..eb35048 100644
--- a/version.js
+++ b/version.js
@@ -7,5 +7,4 @@ export default {
   originalRepo: 'https://code.chipmunk.land/7cc5c4f330d47060/botv12',
   originalName: 'botv12',
   originalAuthor: 'owo439895035', //These three fields should only be changed in forks of forks, if the original fork is compliant with MIT
-  officialUbot: false // Used in production to show correct information in about command. If you set this to true, or otherwise remove the check, please make sure that you still comply with the license
 }