startup timers

master
Kit Kasune 4 years ago
parent 6d4ad7d03e
commit 5f06a6c63e
  1. 1
      .idea/Natsuki.iml
  2. 6
      .idea/jsLibraryMappings.xml
  3. 1
      .idea/modules.xml
  4. 6
      .idea/vcs.xml
  5. 75
      .idea/workspace.xml
  6. 16
      bot.js
  7. 3
      events/ready.js

@ -8,5 +8,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="death" />
</component>
</module>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>

@ -3,6 +3,7 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Natsuki.iml" filepath="$PROJECT_DIR$/.idea/Natsuki.iml" />
<module fileurl="file://$USER_HOME$/WebstormProjects/death/.idea/death.iml" filepath="$USER_HOME$/WebstormProjects/death/.idea/death.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="977e7f53-d837-472d-98d5-0d19ca269f67" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/Natsuki.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/Natsuki.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bot.js" beforeDir="false" afterPath="$PROJECT_DIR$/bot.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/events/ready.js" beforeDir="false" afterPath="$PROJECT_DIR$/events/ready.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JavaScript File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1n9IiG5kVrDYP7HFa5wLZZI14pG" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="javascript.nodejs.core.library.configured.version" value="14.15.4" />
<property name="javascript.nodejs.core.library.typings.version" value="14.14.21" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RunManager">
<configuration name="test.js" type="NodeJSConfigurationType" temporary="true" nameIsGenerated="true" path-to-js-file="$USER_HOME$/WebstormProjects/death/test.js" working-dir="$USER_HOME$/WebstormProjects/death">
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Node.js.test.js" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="977e7f53-d837-472d-98d5-0d19ca269f67" name="Default Changelist" comment="" />
<created>1610796005269</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1610796005269</updated>
<workItem from="1610796007081" duration="78000" />
<workItem from="1610796096772" duration="93000" />
<workItem from="1610796205825" duration="1950000" />
<workItem from="1610841807978" duration="1127000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
</project>

@ -1,5 +1,14 @@
const Discord = require('discord.js');
const client = new Discord.Client();
client.misc = {
savers: ['497598953206841375'],
activeDMs: new Discord.Collection(),
statusPings: new Discord.Collection(),
startup: new Date(),
startupNoConnect: null
};
//const config = require('./config.js');
const auth = require('./auth.json');
@ -7,6 +16,7 @@ const auth = require('./auth.json');
async function init() {
await client.login(auth.token);
client.misc.startupNoConnect = new Date();
client.config = auth;
['commands', 'aliases'].forEach(x => client[x] = new Discord.Collection());
@ -14,12 +24,6 @@ async function init() {
['command', 'event', 'response'].forEach(x => require(`./handle/${x}`)(client));
client.developers = ["330547934951112705", "673477059904929802"];
client.misc = {
savers: ['497598953206841375'],
activeDMs: new Discord.Collection(),
statusPings: new Discord.Collection()
};
client.utils = {};
client.utils.logch = async () => {return client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915');};

@ -90,5 +90,8 @@ module.exports = async client => {
console.log(`${chalk.gray('\n[INFO]')} >> ${chalk.white(`This is restart #${botData.restarts}.`)}`);
let cms = new Date().getTime();
console.log(`${chalk.gray('\n[INFO]')} >> ${chalk.white(`Startup completed in ${cms - client.misc.startup.getTime()}ms (${cms - client.misc.startupNoConnect.getTime()}ms post-connect).`)}`);
await botData.save();
};
Loading…
Cancel
Save