Compare commits

..

No commits in common. 'c2be6001fbcf53f73101ce685862aebab2bb118a' and '412a90df6a52860e4a6cd8b5ae077de2220bf5e7' have entirely different histories.

  1. 1
      .gitignore
  2. 96
      .idea/workspace.xml
  3. 3
      events/ready.js
  4. 3312
      package-lock.json
  5. 5
      package.json
  6. 75
      util/lht.js
  7. 17
      util/time.js

1
.gitignore vendored

@ -2,7 +2,6 @@ node_modules/
config.json config.json
auth.json auth.json
test.js test.js
gauth.json
/.idea/ /.idea/
api/**/* api/**/*

@ -4,9 +4,11 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="826c705b-a7fa-4ece-b82a-e278fca7d494" name="Changes" comment="bully savi"> <list default="true" id="826c705b-a7fa-4ece-b82a-e278fca7d494" name="Changes" comment="more avatar bugs">
<change afterPath="$PROJECT_DIR$/slash/fun/nowplaying.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/util/lht.js" beforeDir="false" afterPath="$PROJECT_DIR$/util/lht.js" afterDir="false" /> <change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -17,19 +19,12 @@
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
<list> <list>
<option value="JavaScript File" /> <option value="JavaScript File" />
<option value="TypeScript File" />
</list> </list>
</option> </option>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component> </component>
<component name="GitHubPullRequestSearchHistory">{
&quot;lastFilter&quot;: {
&quot;state&quot;: &quot;OPEN&quot;,
&quot;assignee&quot;: &quot;WubzyGD&quot;
}
}</component>
<component name="GitSEFilterConfiguration"> <component name="GitSEFilterConfiguration">
<file-type-list> <file-type-list>
<filtered-out-file-type name="LOCAL_BRANCH" /> <filtered-out-file-type name="LOCAL_BRANCH" />
@ -38,21 +33,12 @@
<filtered-out-file-type name="COMMIT_BY_MESSAGE" /> <filtered-out-file-type name="COMMIT_BY_MESSAGE" />
</file-type-list> </file-type-list>
</component> </component>
<component name="GithubPullRequestsUISettings">{
&quot;selectedUrlAndAccountId&quot;: {
&quot;url&quot;: &quot;https://github.com/NatsukiDev/Natsuki&quot;,
&quot;accountId&quot;: &quot;a2fe51af-f1ea-4d53-a0fa-bb9dd34a3ffc&quot;
}
}</component>
<component name="MacroExpansionManager"> <component name="MacroExpansionManager">
<option name="directoryName" value="4aelbj7e" /> <option name="directoryName" value="4aelbj7e" />
</component> </component>
<component name="MarkdownSettingsMigration"> <component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" /> <option name="stateVersion" value="1" />
</component> </component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 5
}</component>
<component name="ProjectId" id="1wWIAa3TuwhYwX0w4tzIs42s0ZG" /> <component name="ProjectId" id="1wWIAa3TuwhYwX0w4tzIs42s0ZG" />
<component name="ProjectLevelVcsManager"> <component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" /> <ConfirmationsSetting value="2" id="Add" />
@ -61,22 +47,23 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent">
&quot;keyToString&quot;: { <property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;, <property name="NEW_TOOLWINDOW_STRIPE_DEFAULTS" value="true" />
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;, <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
&quot;git-widget-placeholder&quot;: &quot;master&quot;, <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
&quot;last_opened_file_path&quot;: &quot;C:/Users/wubzy/Desktop/bot/Natsuki&quot;, <property name="WebServerToolWindowFactoryState" value="false" />
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, <property name="last_opened_file_path" value="$PROJECT_DIR$" />
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, <property name="node.js.detected.package.eslint" value="true" />
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, <property name="node.js.detected.package.tslint" value="true" />
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, <property name="node.js.selected.package.eslint" value="(autodetect)" />
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, <property name="node.js.selected.package.tslint" value="(autodetect)" />
&quot;settings.editor.selected.configurable&quot;: &quot;editor.breadcrumbs&quot;, <property name="nodejs_package_manager_path" value="npm" />
&quot;ts.external.directory.path&quot;: &quot;C:\\Users\\wubzy\\AppData\\Local\\Programs\\WebStorm\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external&quot;, <property name="settings.editor.selected.configurable" value="MTConfigurable" />
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; <property name="ts.external.directory.path" value="C:\Program Files\JetBrains\WebStorm 2021.2\plugins\JavaScriptLanguage\jsLanguageServicesImpl\external" />
} <property name="ts.rename.search.for.dynamic.occurrences" value="true" />
}</component> <property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\clarkjr1836\Desktop\bot\Natsuki\util\ts" /> <recent name="C:\Users\clarkjr1836\Desktop\bot\Natsuki\util\ts" />
@ -154,13 +141,6 @@
<item itemvalue="npm.sync" /> <item itemvalue="npm.sync" />
</list> </list>
</component> </component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-js-predefined-d6986cc7102b-822845ee3bb5-JavaScript-WS-243.23654.157" />
</set>
</attachedChunks>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
@ -197,11 +177,6 @@
<workItem from="1652646106603" duration="1287000" /> <workItem from="1652646106603" duration="1287000" />
<workItem from="1655452467524" duration="126000" /> <workItem from="1655452467524" duration="126000" />
<workItem from="1660254007752" duration="1643000" /> <workItem from="1660254007752" duration="1643000" />
<workItem from="1738896915425" duration="17813000" />
<workItem from="1738996919169" duration="12373000" />
<workItem from="1739479571984" duration="1608000" />
<workItem from="1740108343425" duration="3241000" />
<workItem from="1743256138504" duration="1360000" />
</task> </task>
<task id="LOCAL-00001" summary="not even gonna explain"> <task id="LOCAL-00001" summary="not even gonna explain">
<created>1640148826800</created> <created>1640148826800</created>
@ -343,28 +318,7 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1647788334624</updated> <updated>1647788334624</updated>
</task> </task>
<task id="LOCAL-00021" summary="LHT scripting"> <option name="localTasksCounter" value="21" />
<created>1738924961613</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1738924961613</updated>
</task>
<task id="LOCAL-00022" summary="internal event loop">
<created>1739137258111</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1739137258111</updated>
</task>
<task id="LOCAL-00023" summary="bully savi">
<created>1739137274080</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1739137274080</updated>
</task>
<option name="localTasksCounter" value="24" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@ -380,6 +334,7 @@
</entry> </entry>
</map> </map>
</option> </option>
<option name="oldMeFiltersMigrated" value="true" />
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
@ -403,9 +358,6 @@
<MESSAGE value="marriage declining" /> <MESSAGE value="marriage declining" />
<MESSAGE value="fix avatars" /> <MESSAGE value="fix avatars" />
<MESSAGE value="more avatar bugs" /> <MESSAGE value="more avatar bugs" />
<MESSAGE value="LHT scripting" /> <option name="LAST_COMMIT_MESSAGE" value="more avatar bugs" />
<MESSAGE value="internal event loop" />
<MESSAGE value="bully savi" />
<option name="LAST_COMMIT_MESSAGE" value="bully savi" />
</component> </component>
</project> </project>

@ -110,9 +110,6 @@ module.exports = async client => {
await botData.save(); await botData.save();
} }
await require('../util/time')(client);
await require('../util/lht')(client);
console.log(`${chalk.gray('\n[INFO]')} >> ${chalk.white(`This is restart #${botData.restarts}.`)}`); console.log(`${chalk.gray('\n[INFO]')} >> ${chalk.white(`This is restart #${botData.restarts}.`)}`);
let cms = new Date().getTime(); let cms = new Date().getTime();

3312
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -8,19 +8,14 @@
"@discordjs/builders": "^0.12.0", "@discordjs/builders": "^0.12.0",
"@discordjs/rest": "^0.1.0-canary.0", "@discordjs/rest": "^0.1.0-canary.0",
"@discordjs/voice": "^0.6.0", "@discordjs/voice": "^0.6.0",
"axios": "^1.7.9",
"canvas": "^2.9.0", "canvas": "^2.9.0",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"cheerio": "^1.0.0",
"cron": "^1.8.2", "cron": "^1.8.2",
"dblapi.js": "^2.4.1", "dblapi.js": "^2.4.1",
"discord-api-types": "^0.22.0", "discord-api-types": "^0.22.0",
"discord.js": "^13.5.0", "discord.js": "^13.5.0",
"dreidels": "^0.5.2", "dreidels": "^0.5.2",
"fuzzysort": "^1.1.4", "fuzzysort": "^1.1.4",
"google-auth-library": "^9.15.1",
"google-spreadsheet": "^4.1.4",
"googleapis": "^144.0.0",
"gradient-string": "^2.0.0", "gradient-string": "^2.0.0",
"lastfm": "^0.9.0", "lastfm": "^0.9.0",
"manyitems": "^1.0.2", "manyitems": "^1.0.2",

@ -1,75 +0,0 @@
const path = require('path');
const Discord = require('discord.js');
const axios = require("axios");
const cheerio = require('cheerio');
const {GoogleSpreadsheet} = require('google-spreadsheet');
const {google} = require('googleapis');
const {JWT} = require("google-auth-library");
const auth = require('../gauth.json');
module.exports = async client => { try {
const LH = await client.guilds.fetch('359107239056769044');
const UPDATES = await LH.channels.fetch('1337297601208516699');
let doc = new GoogleSpreadsheet('1JRQ3B4v56Hz1oi8NkGPH0ImAWrrMZXifetb24LMCN1s', new JWT({email: auth.client_email, key: auth.private_key, scopes: ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive.file']}));
await doc.loadInfo();
let sheet = doc.sheetsByIndex[0];
let rows = await sheet.getRows({limit: 500});
let raws = {};
rows.forEach(row => raws[row.get("NAME")] = {link: row.get("LINK RAW"), released: row.get("RELEASED"), raw: row.get("RAW")});
const compareRaws = async () => {
rows = await sheet.getRows({limit: 500});
for (let row of rows) {
if (row.get("RAW") !== raws[row.get("NAME")].raw) {
const {data} = await axios.get(row.get("LINK RAW"));
const $ = cheerio.load(data);
let img = '';
try {img = $('div.col-md-4 > div.text-center > img.thumbnail').attr('src');} catch {} //deviously easy web scrape
let embed = new Discord.MessageEmbed()
.setAuthor({name: "New Raw Posted"})
.setTitle(row.get("NAME")) //TODO IMAGES
.setDescription(`A new raw has been released for *${row.get("NAME")}*.\n\n*time to get to work~*`)
.addField("Old", `**${raws[row.get("NAME")].raw}**`, true)
.addField("New", `**${row.get("RAW")}**`, true)
.addField("Last LH Release", `**${row.get("RELEASED")}**`)
.setURL(row.get("LINK RAW"))
.setFooter({text: "Natsuki", iconURL: client.user.avatarURL()})
.setTimestamp()
if (img && typeof img === 'string' && img.startsWith('https')) {
/*const colors = await prominent(img, {amount: 3, format: 'hex'});*/
embed.setImage(img)
/*.setColor(colors[Math.floor(Math.random() * colors.length)])*/;
} /*else {*/embed.setColor('dc134c');/*}*/
UPDATES.send({
content: (row.get("ROLE") && row.get("ROLE").match(/\d+/g)) ? `<@&${row.get("ROLE")}>` : "I don't know what role to ping for this series!",
embeds: [embed]
}).catch(() => {});
}
raws[row.get("NAME")] = {link: row.get("LINK RAW"), released: row.get("RELEASED"), raw: row.get("RAW")};
}
};
//client.misc.timeTracker.on('minute', compareRaws);
client.misc.timeTracker.on('bullySavi', () => {
const bullies = [
"Ohhhhhh Saviiiii you busy? No? Wanna fix that? (it's LHT time)", "LHT time~~", "u translating rn qt? i smell slacker. stinky",
"You already know why I'm here lol", "Are you ignoring these DMs yet?", "Time to translate some Farming Life :3", "It's ~~your worst nightmare~~Natsuki here~ you ready to do ~~slavery~~TL work?",
"hi i was told im supposed to bully u, dont shoot the messenger", "FBI open up! (i've run out of creative ways to tell you to do your job)", "TL time lol",
"ベリグットツランスレエタタイム", "knock knock, it's your TL work at the door, it wants child support", "bully bully bully bully bully time do your worky worky worky worky work time",
"if you leave LHT i'll leave with you slavery sucks ||just kidding time to do your job (it's unpaid)||", "\\> be you\n\\> be a TL\n\\> realize it's 10am\n\\>ihatemyjob.png", "hi"
];
client.users.fetch('204496174491631616').then(
u => u.send(bullies[Math.floor(Math.random() * bullies.length)])
.catch(() => client.users.fetch(client.developers[0]).then(w => w.send("I couldn't DM Savi!!")))
)
});
} catch {}};

@ -1,17 +0,0 @@
const moment = require('moment');
require('moment-precise-range-plugin');
const EventEmitter = require('node:events');
module.exports = client => {
client.misc.timeTracker = new EventEmitter();
setInterval(() => {
const time = moment();
if (time.hour() === 8 && time.minute() === 0) {client.misc.timeTracker.emit('bullySavi');}
client.misc.timeTracker.emit('minute', time);
}, 60000);
};
Loading…
Cancel
Save