Compare commits

...

11 Commits
v2 ... master

  1. 1
      .gitignore
  2. 120
      .idea/workspace.xml
  3. 27
      bot.js
  4. 1
      commands/leveling/chests.js
  5. 8
      commands/social/fuck.js
  6. 46
      commands/utility/checklist.js
  7. 23
      commands/utility/task.js
  8. 2
      events/messageReactionAdd.js
  9. 3
      events/ready.js
  10. 14
      models/checklist.js
  11. 6
      models/guildlist.js
  12. 0
      models/task.js
  13. 3217
      package-lock.json
  14. 6
      package.json
  15. 65
      slash/fun/nowplaying.js.dev
  16. 75
      util/lht.js
  17. 17
      util/time.js

1
.gitignore vendored

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

@ -4,9 +4,8 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="826c705b-a7fa-4ece-b82a-e278fca7d494" name="Changes" comment="stats without leveling enabled">
<list default="true" id="826c705b-a7fa-4ece-b82a-e278fca7d494" name="Changes" comment="bully savi">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/commands/anime/char.js" beforeDir="false" afterPath="$PROJECT_DIR$/commands/anime/char.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -17,12 +16,19 @@
<option name="RECENT_TEMPLATES">
<list>
<option value="JavaScript File" />
<option value="TypeScript File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitHubPullRequestSearchHistory">{
&quot;lastFilter&quot;: {
&quot;state&quot;: &quot;OPEN&quot;,
&quot;assignee&quot;: &quot;WubzyGD&quot;
}
}</component>
<component name="GitSEFilterConfiguration">
<file-type-list>
<filtered-out-file-type name="LOCAL_BRANCH" />
@ -31,12 +37,21 @@
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
</file-type-list>
</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">
<option name="directoryName" value="4aelbj7e" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 5
}</component>
<component name="ProjectId" id="1wWIAa3TuwhYwX0w4tzIs42s0ZG" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
@ -45,23 +60,22 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
<property name="NEW_TOOLWINDOW_STRIPE_DEFAULTS" value="true" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<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.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="MTConfigurable" />
<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" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/wubzy/Desktop/bot/Natsuki&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;editor.breadcrumbs&quot;,
&quot;ts.external.directory.path&quot;: &quot;C:\\Users\\wubzy\\AppData\\Local\\Programs\\WebStorm\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\clarkjr1836\Desktop\bot\Natsuki\util\ts" />
@ -132,13 +146,20 @@
</configuration>
<list>
<item itemvalue="Node.js.Start" />
<item itemvalue="npm.dev:pretty" />
<item itemvalue="npm.dev" />
<item itemvalue="npm.dev:pretty" />
<item itemvalue="npm.start" />
<item itemvalue="npm.start:pretty" />
<item itemvalue="npm.sync" />
</list>
</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="TaskManager">
<task active="true" id="Default" summary="Default task">
@ -166,6 +187,20 @@
<workItem from="1645765271756" duration="14000" />
<workItem from="1646073200451" duration="122000" />
<workItem from="1646163659329" duration="994000" />
<workItem from="1647134810622" duration="897000" />
<workItem from="1647787300624" duration="1797000" />
<workItem from="1648877743854" duration="1500000" />
<workItem from="1648958883041" duration="864000" />
<workItem from="1651642958178" duration="18000" />
<workItem from="1651946403697" duration="155000" />
<workItem from="1652646106603" duration="1287000" />
<workItem from="1655452467524" duration="126000" />
<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="2999000" />
</task>
<task id="LOCAL-00001" summary="not even gonna explain">
<created>1640148826800</created>
@ -293,7 +328,42 @@
<option name="project" value="LOCAL" />
<updated>1645679244004</updated>
</task>
<option name="localTasksCounter" value="19" />
<task id="LOCAL-00019" summary="fix avatars">
<created>1647787801198</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1647787801198</updated>
</task>
<task id="LOCAL-00020" summary="more avatar bugs">
<created>1647788334624</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1647788334624</updated>
</task>
<task id="LOCAL-00021" summary="LHT scripting">
<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 />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -309,7 +379,6 @@
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
@ -331,6 +400,11 @@
<MESSAGE value="marriage status" />
<MESSAGE value="can't marry yourself lul" />
<MESSAGE value="marriage declining" />
<option name="LAST_COMMIT_MESSAGE" value="marriage declining" />
<MESSAGE value="fix avatars" />
<MESSAGE value="more avatar bugs" />
<MESSAGE value="LHT scripting" />
<MESSAGE value="internal event loop" />
<MESSAGE value="bully savi" />
<option name="LAST_COMMIT_MESSAGE" value="bully savi" />
</component>
</project>

@ -6,11 +6,10 @@ const ora = require('ora');
const mongoose = require('mongoose');
const readline = require('readline');
const {SlashCommand} = require('./util/slash');
const {SlashManager} = require('./util/slashmanager');
const {SlashCommandBuilder} = require('@discordjs/builders');
const {Tag} = require('./util/tag');
const {TagFilter} = require('./util/tagfilter');
const wait = require('./util/wait');
const flags = Discord.Intents.FLAGS;
let fl = []; Object.keys(flags).forEach(flag => fl.push(flags[flag]));
@ -77,6 +76,27 @@ client.misc = {
fullyReady: false
};
let waitAmount = 1000 * 10;
function testConnection() {
return new Promise(async r => {
require('dns').lookup('www.google.com', async e => {
if (e) {
await wait(waitAmount);
waitAmount *= 2;
await testConnection();
r();
}
else {r();}
})
});
}
const auth = require('./auth.json');
async function init() {
@ -178,4 +198,5 @@ async function init() {
await require('./util/wait')(5000);
if (!client.misc.readied) {client.misc.forcedReady = true; await require('./events/ready')(client);}
}
init().then(() => {});
testConnection().then(() => init());

@ -22,7 +22,6 @@ module.exports = {
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.member.permissions.has("ADMINISTRATOR")) {return message.channel.send("You must have administrator permissions in order to edit these settings.");}
if (!args.length) {args[0] = 'enable';}
if (['e', 'enable'].includes(args[0].toLowerCase())) {
if (client.misc.cache.chests.enabled.includes(message.guild.id)) {return message.channel.send("This server already has chest spawning enabled.")};
try {

@ -5,9 +5,12 @@ const UserData = require('../../models/user');
const VC = require('../../models/vscount');
const makeId = require('../../util/makeid');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: "fuck",
aliases: ['sex', 'bang', 'rail', 'verykindlythank'],
help: "Tell others you're horny with `{{p}}fuck`, or bang someone by mentioning someone to fuck!",
meta: {
category: 'Social',
@ -26,10 +29,11 @@ module.exports = {
.setColor('dda0dd')
.setFooter({text: "Natsuki", iconURL: client.user.displayAvatarURL()})
.setTimestamp()]}
: "You can't bang me.......only Wubzy can."
: "You can't bang me....... only Wubzy can."
);}
let fuck;
if (message.channel.nsfw) {
let options = new TagFilter([new Tag(['sfw', 'nonsfw', 'clean'], 'sfw', 'toggle')]).test(args.join(" "));
if (message.channel.nsfw && !options.sfw) {
fuck = await VC.findOne({uid: message.author.id, countOf: 'realfuck'}) || new VC({uid: message.author.id, countOf: 'realfuck'});
savess = await Saves.findOne({name: 'realfuck'}) || new Saves({name: 'realfuck'});
saves = savess.saves;

@ -0,0 +1,46 @@
const Discord = require('discord.js');
const GuildLists = require("../../models/guildlist");
const Checklists = require("../../models/checklist");
const ask = require('../../util/ask');
const makeId = require('../../util/makeid');
module.exports = {
name: "checklist",
aliases: ['chl', 'list'],
meta: {
category: 'Utility',
description: "Create and manage checklists, which let you manage tasks for server members",
syntax: '`checklist <create|list|admin|view|edit|delete|archive|assign|unassign>`',
extra: null,
guildOnly: true
},
help: new Discord.MessageEmbed()
.setTitle("Help -> Checklists")
.setDescription("Checklists manage large goals for your server, for any purpose, and can be assigned tasks, members, and more.")
.addField("Creation", "Use `checklist admin` to toggle admin-locked checklist creation, making it so only admins can make checklists.")
.addField("Syntax", "`checklist <create|list|admin|view|edit|delete|archive|assign|unassign>`"),
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}checklist <create|list|admin|view|edit|delete|archive|assign|unassign>\``);}
const o = args[0].toLowerCase();
if (['c', 'new', 'create'].includes(o)) {
let gl = await GuildLists.findOne({gid: message.guild.id});
if (gl && gl.admin && !message.member.permissions.has("ADMINISTRATOR")) {return message.channel.send("You must be a server administrator in order to make new lists!");}
if (gl && gl.lists.length == 15) {return message.channel.send("Your server has reached the checklist maximum of 15!");}
const name = await ask(message, "What would you like to call this checklist?", 60000); if (!name) {return;}
if (name.length > 50) {return message.channel.send("Your list's name is too long!");}
const desc = await ask(message, "What is the main purpose of this list?", 120000); if (!desc) {return;}
if (desc.length > 400) {return message.channel.send("Please shorten that description a little!");}
let image = null;
let conf = await ask(message, "Would you like to add an image to your list?", 60000); if (!conf) {return;}
if (['yes', 'ye', 'y', 'sure'].includes(conf.trim().toLowerCase())) {
image = await ask(message, `Please paste the image or a link to the image you'd like to add to your new checklist.`, 60000, false, true);
if (!image || !image.match(/^https:\/\/(?:[\w\-].?)+[\/\w\-%()_]+\.(?:png|jpg|jpeg|gif|webp)$/gm)) {return message.channel.send("I don't think that's an image. Try again?");}
}
if (!gl) {gl = new GuildLists({gid: message.guild.id});}
}
}
};

@ -0,0 +1,23 @@
const Discord = require('discord.js');
const Tasks = require("../../models/task");
module.exports = {
name: "task",
aliases: ['t'],
meta: {
category: 'Utility',
description: "Create and manage server-wide tasks for checklists",
syntax: '`task <create|pulse|list|assign|delete|edit|resign|complete|decomplete|status>`',
extra: null,
guildOnly: true
},
help: new Discord.MessageEmbed()
.setTitle("Help -> Tasks")
.setDescription("Tasks are a subset of checklists (`checklist`). They are based server-wide and are locked to the server. Only task or checklist assignees can mark a task as complete.")
.addField("Syntax", "`task <create|pulse|list|assign|delete|edit|resign|complete|decomplete|status>`"),
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}task <create|pulse|list|assign|delete|edit|resign|complete|decomplete|status>\``);}
}
};

@ -23,7 +23,7 @@ module.exports = async (client, reaction, user) => {
if (reaction.message.content.length) {starEmbed.addField("Message", reaction.message.content);}
starEmbed
.addField("Stars", `:star: ${reaction.count}`, true)
.addField(`${reaction.message.member.displayName.toLowerCase().endsWith('s') ? `${reaction.message.member.displayName}'` : `${reaction.message.member.displayName}'s`} StarBoard Count`, sd.starCount[reaction.message.author.id] ? sd.starCount[reaction.message.author.id] + 1 : 1, true);
.addField(`${reaction.message.member.displayName.toLowerCase().endsWith('s') ? `${reaction.message.member.displayName}'` : `${reaction.message.member.displayName}'s`} StarBoard Count`, `${sd.starCount[reaction.message.author.id] ? sd.starCount[reaction.message.author.id] + 1 : 1}`, true);
if (reaction.message.attachments.size) {starEmbed.setImage(reaction.message.attachments.first().url);}
if (Object.keys(sd.stars).includes(reaction.message.id)) {
let starMessage = await reaction.message.guild.channels.cache.get(tg.starchannel).messages.fetch(sd.stars[reaction.message.id]);

@ -110,6 +110,9 @@ module.exports = async client => {
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}.`)}`);
let cms = new Date().getTime();

@ -0,0 +1,14 @@
const mongoose = require('mongoose');
module.exports = mongoose.model('checklist', new mongoose.Schema({
id: String,
ownerId: String,
name: String,
description: String,
image: String,
children: {type: [{
list: Boolean,
id: String
}], default: []},
archived: {type: Boolean, default: false},
assignees: {type: [String], default: []}
}));

@ -0,0 +1,6 @@
const mongoose = require('mongoose');
module.exports = mongoose.model('guildlist', new mongoose.Schema({
gid: {type: String, unique: true},
lists: {type: Object, default: {}},
admin: {type: Boolean, default: false}
}));

3217
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -8,14 +8,19 @@
"@discordjs/builders": "^0.12.0",
"@discordjs/rest": "^0.1.0-canary.0",
"@discordjs/voice": "^0.6.0",
"axios": "^1.7.9",
"canvas": "^2.9.0",
"chalk": "^4.1.0",
"cheerio": "^1.0.0",
"cron": "^1.8.2",
"dblapi.js": "^2.4.1",
"discord-api-types": "^0.22.0",
"discord.js": "^13.5.0",
"dreidels": "^0.5.2",
"fuzzysort": "^1.1.4",
"google-auth-library": "^9.15.1",
"google-spreadsheet": "^4.1.4",
"googleapis": "^144.0.0",
"gradient-string": "^2.0.0",
"lastfm": "^0.9.0",
"manyitems": "^1.0.2",
@ -23,6 +28,7 @@
"moment-precise-range-plugin": "^1.3.0",
"mongoose": "^5.10.3",
"node-fetch": "^2.6.1",
"node-osu": "^2.2.1",
"ora": "^5.3.0",
"swwrap": "^1.0.0",
"tinygradient": "^1.1.5",

@ -0,0 +1,65 @@
const Discord = require('discord.js');
const {SlashCommand} = require('../../util/slash');
const {SlashCommandBuilder} = require('@discordjs/builders');
const Saves = require("../../models/saves");
module.exports = (client) => {
return new SlashCommand('nowplaying', client,
new SlashCommandBuilder()
.setName('nowplaying')
.setDescription("Show off the music you're currently listening to through last.fm!")
.addBooleanOption(option => option
.setName("send")
.setDescription("Whether or not the response should be sent")
)
.addStringOption()
);
};
module.exports = {
name: "nowplaying",
aliases: ['np'],
meta: {
category: 'Fun',
description: "Show off the music you're currently listening to through last.fm!",
syntax: '`nowplaying [@mention]`',
extra: null
},
help: new Discord.MessageEmbed()
.setTitle("Help -> Now Playing")
.setDescription("Accesses last.fm's API to show off what music you're currently listening to. Use the `lfm` command for more information.")
.addField("Syntax", "`nowplaying [@mention]`"),
async execute(message, msg, args, cmd, prefix, mention, client) {
let savess = await Saves.findOne({name: 'lfm'}) ? await Saves.findOne({name: 'lfm'}) : new Saves({name: 'lfm'});
let saves = savess.saves;
let user = mention || message.author;
if (!saves.get(user.id)) {return message.channel.send(`${mention ? "That person's" : "Your"} last.fm username isn't set! ${mention ? "They" : "You"} can set it with \`${prefix}lfm set <username>\``);}
let found = false;
try {
const glfm = function() {return new Promise(resolve => {
let timeout = setTimeout(() => {return resolve(undefined);}, 3000);
let stream = client.lfm.stream(saves.get(user.id));
stream.on('nowPlaying', t => {
clearTimeout(timeout);
message.channel.send({embeds: [new Discord.MessageEmbed()
.setAuthor({name: message.guild ? message.guild.members.cache.get(user.id) ? message.guild.members.cache.get(user.id).displayName : user.username : user.username, iconURL: user.displayAvatarURL()})
.setTitle(`${saves.get(user.id)} | Now Playing`)
.setDescription(`<@${user.id}> is currently listening to **${t.name}** by **${t.artist['#text']}**.\nView the song [here](${t.url}).`)
.setColor("c375f0")
.setThumbnail(t.image[3]['#text'])
.setTimestamp()
]})
found = true;
stream.stop();
return resolve(undefined);
});
stream.start();
});}
await glfm().catch((e) => {console.error(e);});
} catch (e) {console.error(e);}
if (!found) {return message.channel.send(`I couldn't find what \"${saves.get(user.id)}\" is listening to. Perhaps ${!mention ? "you" : "they"}'re not listening to anything, or you got ${!mention ? "your" : "their"} name wrong?`);}
}
};

@ -0,0 +1,75 @@
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 {}};

@ -0,0 +1,17 @@
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() === 9 && time.minute() === 0) {client.misc.timeTracker.emit('bullySavi');}
client.misc.timeTracker.emit('minute', time);
}, 60000);
};
Loading…
Cancel
Save