Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
feat: add login info
Browse files Browse the repository at this point in the history
  • Loading branch information
harryitz committed May 6, 2024
1 parent 776aa17 commit 393c48e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/DiscordNexus.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Language } from "./lang/Language.js";
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { MemoryManager } from "./MemoryManager.js";
import { TextFormat } from "./utils/TextFormat.js";

global.LANGUAGE_PATH = "./src/lang/defaults";

Expand Down Expand Up @@ -79,7 +80,11 @@ export class DiscordNexus extends Client {
}
}
});
console.log(`Logged as ${this.user.username}`)
console.log(
this.getLanguage().translate(
new Translatable(TranslationKeys.NEXUS_LOGIN_INFO, [TextFormat.format(this.user.username, TextFormat.colors.green)])
)
);
})

const pluginsPath = "plugins";
Expand Down
3 changes: 2 additions & 1 deletion src/lang/TranslationKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ export const TranslationKeys = {
NEXUS_VERSION_INFO: "nexus.version.info",
NEXUS_NODE_INFO: "nexus.node.info",
NEXUS_PLATFORM_INFO: "nexus.platform.info",
NEXUS_PLUGIN_NOSUCH: "nexus.plugin.noSuch"
NEXUS_PLUGIN_NOSUCH: "nexus.plugin.noSuch",
NEXUS_LOGIN_INFO: "nexus.logged.info"
};
1 change: 1 addition & 0 deletions src/lang/defaults/eng.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ nexus.version.info=Server Version: %0
nexus.node.info=NodeJS Version: %0
nexus.platform.info=Operating System: %0
nexus.plugin.noSuch=Plugin does not exist!
nexus.logged.info=Nexus is logged in as %0
3 changes: 2 additions & 1 deletion src/lang/defaults/rus.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ nexus.start.cron-info=DiscordNexus Cron работает на %0:%1
nexus.version.info=Версия сервера: %0
nexus.node.info=Версия NodeJS: %0
nexus.platform.info=Операционная система: %0
nexus.plugin.noSuch=Плагин не существует
nexus.plugin.noSuch=Плагин не существует
nexus.logged.info=Nexus вошёл в систему как %0
1 change: 1 addition & 0 deletions src/lang/defaults/vie.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ nexus.version.info=Phiên bản máy chủ: %0
nexus.node.info=Phiên bản NodeJS: %0
nexus.platform.info=Hệ điều hành: %0
nexus.plugin.noSuch=Plugin không tồn tại
nexus.logged.info=Nexus is logged in as %0

0 comments on commit 393c48e

Please sign in to comment.