diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index ce7a248..059eeee 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,8 @@
-
-
+
-
@@ -19,12 +17,19 @@
+ {
+ "lastFilter": {
+ "state": "OPEN",
+ "assignee": "WubzyGD"
+ }
+}
@@ -33,12 +38,21 @@
+ {
+ "selectedUrlAndAccountId": {
+ "url": "https://github.com/NatsukiDev/Natsuki",
+ "accountId": "a2fe51af-f1ea-4d53-a0fa-bb9dd34a3ffc"
+ }
+}
+ {
+ "associatedIndex": 5
+}
@@ -49,13 +63,17 @@
{
"keyToString": {
+ "RunOnceActivity.git.unshallow": "true",
"WebServerToolWindowFactoryState": "false",
+ "git-widget-placeholder": "master",
+ "last_opened_file_path": "C:/Users/wubzy/Desktop/bot/Natsuki",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
- "settings.editor.selected.configurable": "terminal",
+ "settings.editor.selected.configurable": "editor.breadcrumbs",
+ "ts.external.directory.path": "C:\\Users\\wubzy\\AppData\\Local\\Programs\\WebStorm\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external",
"vue.rearranger.settings.migration": "true"
}
}
@@ -136,6 +154,13 @@
+
+
+
+
+
+
+
@@ -173,7 +198,10 @@
-
+
+
+
+
1640148826800
@@ -322,7 +350,21 @@
1738924961613
-
+
+ 1739137258111
+
+
+
+ 1739137258111
+
+
+ 1739137274080
+
+
+
+ 1739137274080
+
+
@@ -362,6 +404,8 @@
-
+
+
+
\ No newline at end of file
diff --git a/src/handle/startup/run/setutils.js b/src/handle/startup/run/setutils.js
new file mode 100644
index 0000000..4f75f36
--- /dev/null
+++ b/src/handle/startup/run/setutils.js
@@ -0,0 +1,22 @@
+module.exports = client => {
+ client.utils = {}; //small collection of basic string manipulation utilities so prettier strings are easier
+
+ //pluralize most strings based on a number
+ client.utils.s = num => num === 1 ? '' : 's';
+ //pluralize but pass in the text to make plural
+ client.utils.as = (num, text) => `${text}${client.utils.s(num)}`;
+ // "a" or "an" based on the provided string, caps to begin with capital letter
+ client.utils.an = (text, caps) => `${caps ? 'A' : 'a'}${['a', 'e', 'i', 'o', 'u'].includes(text.toLowerCase().trim().slice(0, 1)) ? 'n' : ''} ${text}`;
+ //capitalize a string automatically, "a" if rest of string should be automatically lowercased
+ client.utils.c = (text, a=true) => `${text.slice(0, 1).toUpperCase()}${a ? text.slice(1).toLowerCase() : text.slice(1)}`;
+ //split text into words and autocap each one
+ client.utils.ca = (text, a=true) => text.split(/\s+/gm).map(t => client.utils.c(t, a)).join(" ");
+ //format a moment-presice-range object
+ client.utils.sm = (mpr, ago=true) => `${mpr.years ? `${mpr.years} year${client.utils.s(mpr.years)} ` : ''}${mpr.months ? `${mpr.months} month${client.utils.s(mpr.months)} ` : ''}${mpr.days} day${client.utils.s(mpr.days)}${ago ? ' ago' : ''}`;
+ //add a grammatically correct possessive indicator to the end of a word/string
+ client.utils.p = (text) => text.endsWith('s') ? "'" : "'s";
+ //possessivise but pass in the text to possessivize
+ client.utils.ps = (text) => `${text}${client.utils.p(text)}`;
+ //random element of array
+ client.utils.gr = list => list[Math.floor(Math.random() * list.length)];
+};
\ No newline at end of file
diff --git a/src/handle/startup/run/verifyconfig.js b/src/handle/startup/run/verifyconfig.js
new file mode 100644
index 0000000..bc79c2c
--- /dev/null
+++ b/src/handle/startup/run/verifyconfig.js
@@ -0,0 +1,33 @@
+const defaultConfig = {
+ bot: {
+ name: "Cool Bot",
+ consoleName: "CBOT",
+ prefix: "cb.",
+ devPrefix: "cb!"
+ },
+ embed: {
+ colors: {
+ base: "c375f0",
+ success: "23d534",
+ fail: "d52334"
+ }
+ },
+ log: {
+ suffix: ">>",
+ defaultLevel: 1,
+ colors: {
+ error: "redBright",
+ warn: "yellowBright",
+ success: "greenBright",
+ notice: "#8521a0",
+ primary: "blue",
+ secondary: "green",
+ altprimary: "blueBright",
+ altsecondary: "greenBright"
+ }
+ }
+}
+
+module.exports = client => {
+
+};
\ No newline at end of file
diff --git a/src/util/ts/src/command.ts b/src/util/ts/src/command.ts
new file mode 100644
index 0000000..8cc16b6
--- /dev/null
+++ b/src/util/ts/src/command.ts
@@ -0,0 +1,64 @@
+import {Embed, Client, Message} from "discord.js";
+
+export class Command {
+
+ name: string;
+ meta: CommandMeta;
+ help: Embed | string;
+
+ constructor(name: string, meta: CommandMeta, help: Embed | string) {
+ this.name = name;
+ this.meta = meta;
+ this.help = help;
+ }
+
+}
+
+export class SubCommand {
+
+}
+
+export class TextCommand extends Command {
+
+ private _execute: (client: Client, message: Message, args: string[], cmd: TextCommandCmdArg) => void | any;
+
+ subCommandsKey: Map;
+ subCommands: Map;
+ enabled: boolean = true;
+
+
+ constructor(name: string, meta: CommandMeta, help: Embed | string, execute: (client: Client, message: Message, args: string[], cmd: TextCommandCmdArg) => void | any, subCommands?: SubCommand[]) {
+ super(name, meta, help);
+ this._execute = execute;
+ if (subCommands && Array.isArray(subCommands) && subCommands.length) {
+ //
+ }
+ }
+
+ public execute(client: Client, message: Message, args: string[], cmd: TextCommandCmdArg): void | any {
+ if (!this.enabled) {return;} //TODO command return output logging flag
+ return this._execute(client, message, args, cmd);
+ }
+
+ public toggle(): void {this.enabled = !this.enabled;}
+ public enable(): void {this.enabled = true;}
+ public disable(): void {this.enabled = false;}
+
+}
+
+export class SlashCommand extends Command {}
+
+
+export interface CommandMeta {
+ category: string,
+ description: string,
+ syntax: string,
+ extra: string | null
+}
+
+export interface TextCommandCmdArg {
+ msg: string,
+ name: string,
+ prefix: string,
+ args: string[]
+}
\ No newline at end of file
diff --git a/util/lht.js b/util/lht.js
index c49f328..62aaa62 100644
--- a/util/lht.js
+++ b/util/lht.js
@@ -56,7 +56,7 @@ module.exports = async client => { try {
}
};
- client.misc.timeTracker.on('minute', compareRaws);
+ //client.misc.timeTracker.on('minute', compareRaws);
client.misc.timeTracker.on('bullySavi', () => {
const bullies = [
diff --git a/util/time.js b/util/time.js
index e7ddbbf..e78424e 100644
--- a/util/time.js
+++ b/util/time.js
@@ -9,7 +9,7 @@ module.exports = client => {
const time = moment();
- if (time.hour() === 20 && time.minute() === 0) {client.misc.timeTracker.emit('bullySavi');}
+ if (time.hour() === 8 && time.minute() === 0) {client.misc.timeTracker.emit('bullySavi');}
client.misc.timeTracker.emit('minute', time);