1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Toast
e964841943
Update MPLoop.ts 2023-08-28 14:23:49 +10:00
Toast
7d2e1e5770
Update index.ts 2023-08-28 14:22:47 +10:00
Toast
ac62ceb424
Update MPLoop.ts 2023-08-28 14:22:12 +10:00
dependabot[bot]
584c67eceb
Bump systeminformation from 5.20.0 to 5.21.0 (#24)
Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 5.20.0 to 5.21.0.
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/compare/v5.20.0...v5.21.0)

---
updated-dependencies:
- dependency-name: systeminformation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 14:11:09 +10:00
github-actions[bot]
12054752b0
Combined Dependabot PR (#23)
* Bump @types/node from 20.5.6 to 20.5.7

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.5.6 to 20.5.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump mongoose from 7.4.4 to 7.4.5

Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.4 to 7.4.5.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.4...7.4.5)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump systeminformation from 5.19.1 to 5.20.0

Bumps [systeminformation](https://github.com/sebhildebrandt/systeminformation) from 5.19.1 to 5.20.0.
- [Changelog](https://github.com/sebhildebrandt/systeminformation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebhildebrandt/systeminformation/compare/v5.19.1...v5.20.0)

---
updated-dependencies:
- dependency-name: systeminformation
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-28 14:07:19 +10:00
AnxietyisReal
9c7cc4d5b8 Why is this here? 2023-08-28 12:51:17 +10:00
AnxietyisReal
073d1c07d1 Fix ID for general-chat 2023-08-28 12:50:16 +10:00
AnxietyisReal
7dfc83d7b1 Create ResponseSystem 2023-08-28 12:48:18 +10:00
8 changed files with 110 additions and 88 deletions

38
.pnp.cjs generated
View File

@ -33,16 +33,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@octokit/auth-token", "npm:4.0.0"],\ ["@octokit/auth-token", "npm:4.0.0"],\
["@octokit/rest", "npm:20.0.1"],\ ["@octokit/rest", "npm:20.0.1"],\
["@types/ms", "npm:0.7.31"],\ ["@types/ms", "npm:0.7.31"],\
["@types/node", "npm:20.5.6"],\ ["@types/node", "npm:20.5.7"],\
["canvas", "npm:2.11.2"],\ ["canvas", "npm:2.11.2"],\
["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\ ["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\
["discord.js", "npm:14.13.0"],\ ["discord.js", "npm:14.13.0"],\
["libsodium-wrappers", "npm:0.7.11"],\ ["libsodium-wrappers", "npm:0.7.11"],\
["moment", "npm:2.29.4"],\ ["moment", "npm:2.29.4"],\
["mongoose", "npm:7.4.4"],\ ["mongoose", "npm:7.4.5"],\
["ms", "npm:2.1.3"],\ ["ms", "npm:2.1.3"],\
["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\ ["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\
["systeminformation", "npm:5.19.1"],\ ["systeminformation", "npm:5.21.0"],\
["typescript", "patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"],\ ["typescript", "patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"],\
["xml-js", "npm:1.6.11"],\ ["xml-js", "npm:1.6.11"],\
["youtube-sr", "npm:4.3.4"],\ ["youtube-sr", "npm:4.3.4"],\
@ -526,10 +526,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
],\ ],\
"linkType": "HARD"\ "linkType": "HARD"\
}],\ }],\
["npm:20.5.6", {\ ["npm:20.5.7", {\
"packageLocation": "./.yarn/cache/@types-node-npm-20.5.6-f7a7eed369-d2ce44f1cf.zip/node_modules/@types/node/",\ "packageLocation": "./.yarn/cache/@types-node-npm-20.5.7-b5e80f1922-fc284c8e16.zip/node_modules/@types/node/",\
"packageDependencies": [\ "packageDependencies": [\
["@types/node", "npm:20.5.6"]\ ["@types/node", "npm:20.5.7"]\
],\ ],\
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\
@ -916,16 +916,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@octokit/auth-token", "npm:4.0.0"],\ ["@octokit/auth-token", "npm:4.0.0"],\
["@octokit/rest", "npm:20.0.1"],\ ["@octokit/rest", "npm:20.0.1"],\
["@types/ms", "npm:0.7.31"],\ ["@types/ms", "npm:0.7.31"],\
["@types/node", "npm:20.5.6"],\ ["@types/node", "npm:20.5.7"],\
["canvas", "npm:2.11.2"],\ ["canvas", "npm:2.11.2"],\
["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\ ["discord-player", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:6.6.2"],\
["discord.js", "npm:14.13.0"],\ ["discord.js", "npm:14.13.0"],\
["libsodium-wrappers", "npm:0.7.11"],\ ["libsodium-wrappers", "npm:0.7.11"],\
["moment", "npm:2.29.4"],\ ["moment", "npm:2.29.4"],\
["mongoose", "npm:7.4.4"],\ ["mongoose", "npm:7.4.5"],\
["ms", "npm:2.1.3"],\ ["ms", "npm:2.1.3"],\
["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\ ["prism-media", "virtual:20c353e2d6536e37339997f03975c6a660f4d296e664d291bd43620c6162cca8eb5ef90b0998dc9db75ff6862e5da587d0530bae26805f5fadc8f17aaa4ff794#npm:1.3.5"],\
["systeminformation", "npm:5.19.1"],\ ["systeminformation", "npm:5.21.0"],\
["typescript", "patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"],\ ["typescript", "patch:typescript@npm%3A5.2.2#~builtin<compat/typescript>::version=5.2.2&hash=f3b441"],\
["xml-js", "npm:1.6.11"],\ ["xml-js", "npm:1.6.11"],\
["youtube-sr", "npm:4.3.4"],\ ["youtube-sr", "npm:4.3.4"],\
@ -1849,10 +1849,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
],\ ],\
"linkType": "SOFT"\ "linkType": "SOFT"\
}],\ }],\
["virtual:806a47d2373274fd76cd2d3daf79db5b84b03c36c63d0a3903a6998364b5ab2d2299d972d445ed6004dba802b10f22f34264a9bdd91c7654035f44410ad707b7#npm:5.7.0", {\ ["virtual:f13f0698828b1136b9c2fe7fd47b1d970be7543f740ea5a6542d5de086caf8ce3fde9627ee2446a16f34f568a86debbe37012d1a655c3979e155ff37d7833a12#npm:5.7.0", {\
"packageLocation": "./.yarn/__virtual__/mongodb-virtual-e218204750/0/cache/mongodb-npm-5.7.0-c5e415a2e7-16357b6229.zip/node_modules/mongodb/",\ "packageLocation": "./.yarn/__virtual__/mongodb-virtual-66143c0721/0/cache/mongodb-npm-5.7.0-c5e415a2e7-16357b6229.zip/node_modules/mongodb/",\
"packageDependencies": [\ "packageDependencies": [\
["mongodb", "virtual:806a47d2373274fd76cd2d3daf79db5b84b03c36c63d0a3903a6998364b5ab2d2299d972d445ed6004dba802b10f22f34264a9bdd91c7654035f44410ad707b7#npm:5.7.0"],\ ["mongodb", "virtual:f13f0698828b1136b9c2fe7fd47b1d970be7543f740ea5a6542d5de086caf8ce3fde9627ee2446a16f34f568a86debbe37012d1a655c3979e155ff37d7833a12#npm:5.7.0"],\
["@aws-sdk/credential-providers", null],\ ["@aws-sdk/credential-providers", null],\
["@mongodb-js/zstd", null],\ ["@mongodb-js/zstd", null],\
["@types/aws-sdk__credential-providers", null],\ ["@types/aws-sdk__credential-providers", null],\
@ -1895,13 +1895,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\ }]\
]],\ ]],\
["mongoose", [\ ["mongoose", [\
["npm:7.4.4", {\ ["npm:7.4.5", {\
"packageLocation": "./.yarn/cache/mongoose-npm-7.4.4-806a47d237-54d014b435.zip/node_modules/mongoose/",\ "packageLocation": "./.yarn/cache/mongoose-npm-7.4.5-f13f069882-a017bd90bb.zip/node_modules/mongoose/",\
"packageDependencies": [\ "packageDependencies": [\
["mongoose", "npm:7.4.4"],\ ["mongoose", "npm:7.4.5"],\
["bson", "npm:5.4.0"],\ ["bson", "npm:5.4.0"],\
["kareem", "npm:2.5.1"],\ ["kareem", "npm:2.5.1"],\
["mongodb", "virtual:806a47d2373274fd76cd2d3daf79db5b84b03c36c63d0a3903a6998364b5ab2d2299d972d445ed6004dba802b10f22f34264a9bdd91c7654035f44410ad707b7#npm:5.7.0"],\ ["mongodb", "virtual:f13f0698828b1136b9c2fe7fd47b1d970be7543f740ea5a6542d5de086caf8ce3fde9627ee2446a16f34f568a86debbe37012d1a655c3979e155ff37d7833a12#npm:5.7.0"],\
["mpath", "npm:0.9.0"],\ ["mpath", "npm:0.9.0"],\
["mquery", "npm:5.0.0"],\ ["mquery", "npm:5.0.0"],\
["ms", "npm:2.1.3"],\ ["ms", "npm:2.1.3"],\
@ -2598,10 +2598,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\ }]\
]],\ ]],\
["systeminformation", [\ ["systeminformation", [\
["npm:5.19.1", {\ ["npm:5.21.0", {\
"packageLocation": "./.yarn/unplugged/systeminformation-npm-5.19.1-586055f0a7/node_modules/systeminformation/",\ "packageLocation": "./.yarn/unplugged/systeminformation-npm-5.21.0-553db82075/node_modules/systeminformation/",\
"packageDependencies": [\ "packageDependencies": [\
["systeminformation", "npm:5.19.1"]\ ["systeminformation", "npm:5.21.0"]\
],\ ],\
"linkType": "HARD"\ "linkType": "HARD"\
}]\ }]\

View File

@ -37,10 +37,10 @@
"discord.js": "14.13.0", "discord.js": "14.13.0",
"libsodium-wrappers": "0.7.11", "libsodium-wrappers": "0.7.11",
"moment": "2.29.4", "moment": "2.29.4",
"mongoose": "7.4.4", "mongoose": "7.4.5",
"ms": "2.1.3", "ms": "2.1.3",
"prism-media": "1.3.5", "prism-media": "1.3.5",
"systeminformation": "5.19.1", "systeminformation": "5.21.0",
"typescript": "5.2.2", "typescript": "5.2.2",
"xml-js": "1.6.11", "xml-js": "1.6.11",
"youtube-sr": "4.3.4", "youtube-sr": "4.3.4",
@ -48,6 +48,6 @@
}, },
"devDependencies": { "devDependencies": {
"@types/ms": "0.7.31", "@types/ms": "0.7.31",
"@types/node": "20.5.6" "@types/node": "20.5.7"
} }
} }

View File

@ -51,7 +51,8 @@
"633345781780185099", "633345781780185099",
"215497515934416896", "215497515934416896",
"141304507249197057", "141304507249197057",
"178941218510602240" "178941218510602240",
"700641965787709520"
], ],
"mainServer": { "mainServer": {
"id": "468835415093411861", "id": "468835415093411861",

View File

@ -1,5 +1,6 @@
import Discord from 'discord.js'; import Discord from 'discord.js';
import TClient from 'src/client'; import TClient from '../client.js';
import Response from '../funcs/ResponseSystem.js';
export default { export default {
async run(client:TClient, message:Discord.Message){ async run(client:TClient, message:Discord.Message){
if (message.author.bot) return; if (message.author.bot) return;
@ -64,53 +65,17 @@ export default {
// Autoresponse:tm: // Autoresponse:tm:
if (client.config.botSwitches.autores && !automodded) { if (client.config.botSwitches.autores && !automodded) {
/* function ResponseMadeBy(id:string){ <-- Will be enabled once autoresponse suggestion comes in.
return `╰ *Response made by <@${id}>*`;
} */
const PersonnyMcPerson = `**${message.member.displayName}**`;
const GeneralChatID = '468835415093411863';
const incomingArrays = { const incomingArrays = {
morning: ['good morning all', 'good morning everyone', 'good morning lads', 'morning all', 'morning everyone', 'morning lads', 'morning guys', 'good morning everybody', 'morning yall', 'morning y\'all'],
afternoon: ['good afternoon', 'afternoon all', 'afternoon everyone'],
evening: ['good evening', 'evening all', 'evening everyone', 'evening lads'],
night: ['night all', 'night everyone', 'night guys', 'goodnight', 'good night'],
password: ['whats the password', 'what\'s the password', 'password pls'], password: ['whats the password', 'what\'s the password', 'password pls'],
cantRead: ['i cant read', 'i can\'t read', 'cant read', 'can\'t read'], cantRead: ['i cant read', 'i can\'t read', 'cant read', 'can\'t read'],
theyBrokeIt: ['break', 'broke', 'broken'], theyBrokeIt: ['break', 'broke', 'broken'],
deadChat: ['dead chat', 'chat is dead', 'dead server', 'inactive chat', 'inactive channel'] deadChat: ['dead chat', 'chat is dead', 'dead server', 'inactive chat', 'inactive channel']
} }
const outgoingArrays = { const GeneralChatID = '468835415093411863';
morning: [ Response.create(client, message, GeneralChatID, 'morning');
`Morning ${PersonnyMcPerson}, did you sleep great?`, `Good morning ${PersonnyMcPerson}!`, `Hope you enjoyed your breakfast, ${PersonnyMcPerson}!`, Response.create(client, message, GeneralChatID, 'afternoon');
`Gm ${PersonnyMcPerson}.`, `Uh.. What time is it? Oh yea, morning ${PersonnyMcPerson}.`, `Morning and hope you had a good dream last night, ${PersonnyMcPerson}.`, Response.create(client, message, GeneralChatID, 'evening');
'Time to get started with today\'s stuff!', `Don't forget to do your morning routine, ${PersonnyMcPerson}!`, 'Enjoy the breakfast and start your day.', Response.create(client, message, GeneralChatID, 'night');
'Nuh! No morning message for you!\n*Just kidding, good morning!*', `Rise and shine, ${PersonnyMcPerson}.`, 'Howdy! How\'s your morning?',
`*opens blinds wide enough to blast sunrays into the room*\nWakey wakey, ${PersonnyMcPerson}. Time to get up!`, 'https://tenor.com/view/skyrim-intro-awake-finally-awake-gif-22633549',
`Good grief, is it Monday already? Anyways, morning ${PersonnyMcPerson}..`, `This time I can shout! So here we go! 1..2..3\n*inhales*\nMORNING ${PersonnyMcPerson.toUpperCase()}!`,
'Gooooood morning to you!', `Good morning to you! You know what else is good? A segue to our sponsor, breakfast!\nGet started with getting out of the bed and have some breakfast!`,
`## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!', `Here, have some pancakes for breakfast, ${PersonnyMcPerson}`, 'Is it Friday yet? This week is getting boring already!',
`You have reached ${client.moment.utc().dayOfYear().toLocaleString('en-US')}th day of the year, also good morning to you as well!`, 'Good morning! Have a cookie to start your day with. :cookie:',
'https://tenor.com/view/rambo-family-rambo-rise-and-shine-wake-up-gif-22012440'
],
afternoon: [
`Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`,
'Hope you had a good day so far.', `Did you enjoy your day yet, ${PersonnyMcPerson}?`, 'Weather doesn\'t look too bad outside right?',
`How's the trip outside, ${PersonnyMcPerson}?`, `~~Morning~~ Afternoon ${PersonnyMcPerson}!`, 'Afternoon already? Jeez, time go brrrr!',
'We\'re halfway through the day, aren\'t we?', `Ready to enjoy your delicious lunch, ${PersonnyMcPerson}?`, '### Quite a wonderful weather today!'
],
evening: [
'I can\'t believe the time flies so quickly!', `Evening ${PersonnyMcPerson}!`, `Hope you enjoyed the dinner, ${PersonnyMcPerson}!`,
`Good evening ${PersonnyMcPerson}!`, 'You look tired, ready to go to sleep yet?', 'Being outside was an exhausting task isn\'t it?',
'Did you have a good day so far?', 'May I suggest sleep?', `You heard me! ${PersonnyMcPerson}, it's almost dinner time!`,
`How's your day going, ${PersonnyMcPerson}?`, `${PersonnyMcPerson}, may I suggest... *sleep?*`, 'Today is almost over, you deserve some rest!'
],
night: [
`Good night ${PersonnyMcPerson}!`, `Night ${PersonnyMcPerson}!`, `Sweet dreams, ${PersonnyMcPerson}.`, `Don't fall out of sky in your dreamworld, ${PersonnyMcPerson}!`,
'Nighty night!', `I hope tomorrow is a good day for you, ${PersonnyMcPerson}!`, `Have a good sleep, ${PersonnyMcPerson}!`, `I :b:et you a cookie if you actually slept through the night! ${PersonnyMcPerson}`,
`Sleep well ${PersonnyMcPerson}.`, `Gn ${PersonnyMcPerson}.`, `Close your eyelids and sleep, ${PersonnyMcPerson}.`, `Good night ${PersonnyMcPerson} and hope your pillow is nice and cold!`,
`# Night ${PersonnyMcPerson}!`, `You should try maintaining your sleep schedule if you're that really tired, ${PersonnyMcPerson}.`
]
}
if (message.mentions.members.has('309373272594579456') && !client.isStaff(message.member)) message.reply('Please don\'t tag Daggerwin, read rule 14 in <#468846117405196289>'); if (message.mentions.members.has('309373272594579456') && !client.isStaff(message.member)) message.reply('Please don\'t tag Daggerwin, read rule 14 in <#468846117405196289>');
if (message.mentions.members.has('215497515934416896') && !client.isStaff(message.member) && message.type != 19) message.reply('Please don\'t tag Monster unless it\'s important!'); if (message.mentions.members.has('215497515934416896') && !client.isStaff(message.member) && message.type != 19) message.reply('Please don\'t tag Monster unless it\'s important!');
@ -120,10 +85,6 @@ export default {
if (incomingArrays.deadChat.some(e=>message.content.toLowerCase().includes(e))) message.reply('https://cdn.discordapp.com/attachments/925589318276382720/1011333656167579849/F57G5ZS.png'); if (incomingArrays.deadChat.some(e=>message.content.toLowerCase().includes(e))) message.reply('https://cdn.discordapp.com/attachments/925589318276382720/1011333656167579849/F57G5ZS.png');
if (msgarr.includes('nawdic') && incomingArrays.theyBrokeIt.some(e=>msgarr.includes(e)) && client.isStaff(message.member) && message.channelId !== '516344221452599306') message.reply({embeds: [new client.embed().setTitle('*Nawdic has done an oopsie*').setImage('https://c.tenor.com/JSj9ie_MD9kAAAAC/kopfsch%C3%BCtteln-an-kopf-fassen-oh-no.gif').setColor(client.config.embedColor)]}); if (msgarr.includes('nawdic') && incomingArrays.theyBrokeIt.some(e=>msgarr.includes(e)) && client.isStaff(message.member) && message.channelId !== '516344221452599306') message.reply({embeds: [new client.embed().setTitle('*Nawdic has done an oopsie*').setImage('https://c.tenor.com/JSj9ie_MD9kAAAAC/kopfsch%C3%BCtteln-an-kopf-fassen-oh-no.gif').setColor(client.config.embedColor)]});
if (msgarr.includes('monster') && incomingArrays.theyBrokeIt.some(e=>msgarr.includes(e)) && client.isStaff(message.member) && message.channelId !== '516344221452599306') message.reply({embeds: [new client.embed().setTitle('*Monster has broken something*').setImage('https://media.tenor.com/ZIzIjb_wvEoAAAAC/face-palm.gif').setColor(client.config.embedColor)]}); if (msgarr.includes('monster') && incomingArrays.theyBrokeIt.some(e=>msgarr.includes(e)) && client.isStaff(message.member) && message.channelId !== '516344221452599306') message.reply({embeds: [new client.embed().setTitle('*Monster has broken something*').setImage('https://media.tenor.com/ZIzIjb_wvEoAAAAC/face-palm.gif').setColor(client.config.embedColor)]});
if (incomingArrays.morning.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${outgoingArrays.morning[Math.floor(Math.random()*outgoingArrays.morning.length)]}`);
if (incomingArrays.afternoon.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${outgoingArrays.afternoon[Math.floor(Math.random()*outgoingArrays.afternoon.length)]}`);
if (incomingArrays.evening.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${outgoingArrays.evening[Math.floor(Math.random()*outgoingArrays.evening.length)]}`);
if (incomingArrays.night.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${outgoingArrays.night[Math.floor(Math.random()*outgoingArrays.night.length)]}`);
// Failsafe thingy (Toastproof maybe) // Failsafe thingy (Toastproof maybe)
if (message.content.startsWith('!!_wepanikfrfr') && client.config.whitelist.includes(message.author.id)) (client.guilds.cache.get(message.guildId) as Discord.Guild).commands.set(client.registry).then(()=>message.reply('How did you manage to lose the commands??? Anyways, it\'s re-registered now.')).catch((e:Error)=>message.reply(`Failed to deploy slash commands:\n\`\`\`${e.message}\`\`\``)); if (message.content.startsWith('!!_wepanikfrfr') && client.config.whitelist.includes(message.author.id)) (client.guilds.cache.get(message.guildId) as Discord.Guild).commands.set(client.registry).then(()=>message.reply('How did you manage to lose the commands??? Anyways, it\'s re-registered now.')).catch((e:Error)=>message.reply(`Failed to deploy slash commands:\n\`\`\`${e.message}\`\`\``));
} }

View File

@ -19,7 +19,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
} }
const HITALL = async()=>{ const HITALL = async()=>{
let sessionInit = {signal: AbortSignal.timeout(7500),headers:{'User-Agent':`Daggerbot - HITALL/undici`}}; let sessionInit = {signal: AbortSignal.timeout(8200),headers:{'User-Agent':`Daggerbot - HITALL/undici`}};
try { try {
const hitDSS = await fetch(Server.ip+'/feed/dedicated-server-stats.json?code='+Server.code, sessionInit).then(r=>r.json() as Promise<FSData>); const hitDSS = await fetch(Server.ip+'/feed/dedicated-server-stats.json?code='+Server.code, sessionInit).then(r=>r.json() as Promise<FSData>);
const hitCSG = await fetch(Server.ip+'/feed/dedicated-server-savegame.html?code='+Server.code+'&file=careerSavegame', sessionInit).then(async r=>(client.xjs.xml2js(await r.text(), {compact: true}) as any).careerSavegame as FSCareerSavegame); const hitCSG = await fetch(Server.ip+'/feed/dedicated-server-savegame.html?code='+Server.code+'&file=careerSavegame', sessionInit).then(async r=>(client.xjs.xml2js(await r.text(), {compact: true}) as any).careerSavegame as FSCareerSavegame);
@ -84,7 +84,7 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
{name: 'Timescale', value: isNaN(Number(hitCSG.settings?.timeScale._text)) === true ? 'Unavailable' : formatTimescale(Number(hitCSG.settings?.timeScale._text), 0, 'x'), inline: true} {name: 'Timescale', value: isNaN(Number(hitCSG.settings?.timeScale._text)) === true ? 'Unavailable' : formatTimescale(Number(hitCSG.settings?.timeScale._text), 0, 'x'), inline: true}
); );
const playersEmbed = new client.embed().setColor(client.config.embedColor).setTitle(hitDSS.server.name).setDescription(hitDSS.slots.used < 1 ? '*No players online*' : playerData.join('\n\n')).setAuthor({name:`${hitDSS.slots.used}/${hitDSS.slots.capacity}`}); const playersEmbed = new client.embed().setColor(client.config.embedColor).setTitle(hitDSS.server.name).setDescription(hitDSS.slots.used < 1 ? '*No players online*' : playerData.join('\n\n')).setAuthor({name:`${hitDSS.slots.used}/${hitDSS.slots.capacity}`});
msg.edit({content:'This embed updates every 30 seconds.',embeds:[serverDetails, playersEmbed]}); msg.edit({content:'This embed updates every 35 seconds.',embeds:[serverDetails, playersEmbed]});
} }
} catch(err) { } catch(err) {
msg.edit({content: null, embeds: [new client.embed().setColor(client.config.embedColorRed).setTitle('Host did not respond back in time')]}); msg.edit({content: null, embeds: [new client.embed().setColor(client.config.embedColorRed).setTitle('Host did not respond back in time')]});
@ -92,5 +92,5 @@ export default async(client:TClient, Channel:string, Message:string, Server:TSer
} }
} }
HITALL(); HITALL();
// Hit dem servers in the head every 30 seconds. // Hit dem servers in the head every 35 seconds.
} }

View File

@ -0,0 +1,60 @@
import Discord from 'discord.js';
import TClient from 'src/client';
/* function ResponseMadeBy(id:string){ <-- Will be enabled once autoresponse suggestion comes in.
return `╰ *Response made by <@${id}>*`;
} */
export default class Response {
static readonly incomingArrays = {
morning: ['good morning all', 'good morning everyone', 'good morning lads', 'morning all', 'morning everyone', 'morning lads', 'morning guys', 'good morning everybody', 'morning yall', 'morning y\'all'],
afternoon: ['good afternoon', 'afternoon all', 'afternoon everyone'],
evening: ['good evening', 'evening all', 'evening everyone', 'evening lads'],
night: ['night all', 'night everyone', 'night guys', 'goodnight', 'good night']
} as const
static create(client:TClient, message:Discord.Message, channel:Discord.Snowflake, keyword:string) {
if (message.channelId != channel || message.type != 0) return;
this.respond(client, message, keyword);
}
static respond(client:TClient, message:Discord.Message, responseKeyword:string) {
if (this.incomingArrays[responseKeyword].some(m=>message.content.toLowerCase().startsWith(m))) return message.reply(`${this.outgoingArrays(client, message)[responseKeyword][Math.floor(Math.random() * this.outgoingArrays(client, message)[responseKeyword].length)]}`)
}
static outgoingArrays(client:TClient, message:Discord.Message) {
const PersonnyMcPerson = `**${message.member.displayName}**`;
return {
morning: [
`Morning ${PersonnyMcPerson}, did you sleep great?`, `Good morning ${PersonnyMcPerson}!`, `Hope you enjoyed your breakfast, ${PersonnyMcPerson}!`,
`Gm ${PersonnyMcPerson}.`, `Uh.. What time is it? Oh yea, morning ${PersonnyMcPerson}.`, `Morning and hope you had a good dream last night, ${PersonnyMcPerson}.`,
'Time to get started with today\'s stuff!', `Don't forget to do your morning routine, ${PersonnyMcPerson}!`, 'Enjoy the breakfast and start your day.',
'Nuh! No morning message for you!\n*Just kidding, good morning!*', `Rise and shine, ${PersonnyMcPerson}.`, 'Howdy! How\'s your morning?',
`*opens blinds wide enough to blast sunrays into the room*\nWakey wakey, ${PersonnyMcPerson}. Time to get up!`, 'https://tenor.com/view/skyrim-intro-awake-finally-awake-gif-22633549',
`Good grief, is it Monday already? Anyways, morning ${PersonnyMcPerson}..`, `This time I can shout! So here we go! 1..2..3\n*inhales*\nMORNING ${PersonnyMcPerson.toUpperCase()}!`,
'Gooooood morning to you!', `Good morning to you! You know what else is good? A segue to our sponsor, breakfast!\nGet started with getting out of the bed and have some breakfast!`,
`## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!', `Here, have some pancakes for breakfast, ${PersonnyMcPerson}`, 'Is it Friday yet? This week is getting boring already!',
`You have reached ${client.moment.utc().dayOfYear().toLocaleString('en-US')}th day of the year, also good morning to you as well!`, 'Good morning! Have a cookie to start your day with. :cookie:',
'https://tenor.com/view/rambo-family-rambo-rise-and-shine-wake-up-gif-22012440'
],
afternoon: [
`Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`,
'Hope you had a good day so far.', `Did you enjoy your day yet, ${PersonnyMcPerson}?`, 'Weather doesn\'t look too bad outside right?',
`How's the trip outside, ${PersonnyMcPerson}?`, `~~Morning~~ Afternoon ${PersonnyMcPerson}!`, 'Afternoon already? Jeez, time go brrrr!',
'We\'re halfway through the day, aren\'t we?', `Ready to enjoy your delicious lunch, ${PersonnyMcPerson}?`, '### Quite a wonderful weather today!'
],
evening: [
'I can\'t believe the time flies so quickly!', `Evening ${PersonnyMcPerson}!`, `Hope you enjoyed the dinner, ${PersonnyMcPerson}!`,
`Good evening ${PersonnyMcPerson}!`, 'You look tired, ready to go to sleep yet?', 'Being outside was an exhausting task isn\'t it?',
'Did you have a good day so far?', 'May I suggest sleep?', `You heard me! ${PersonnyMcPerson}, it's almost dinner time!`,
`How's your day going, ${PersonnyMcPerson}?`, `${PersonnyMcPerson}, may I suggest... *sleep?*`, 'Today is almost over, you deserve some rest!'
],
night: [
`Good night ${PersonnyMcPerson}!`, `Night ${PersonnyMcPerson}!`, `Sweet dreams, ${PersonnyMcPerson}.`, `Don't fall out of sky in your dreamworld, ${PersonnyMcPerson}!`,
'Nighty night!', `I hope tomorrow is a good day for you, ${PersonnyMcPerson}!`, `Have a good sleep, ${PersonnyMcPerson}!`, `I :b:et you a cookie if you actually slept through the night! ${PersonnyMcPerson}`,
`Sleep well ${PersonnyMcPerson}.`, `Gn ${PersonnyMcPerson}.`, `Close your eyelids and sleep, ${PersonnyMcPerson}.`, `Good night ${PersonnyMcPerson} and hope your pillow is nice and cold!`,
`# Night ${PersonnyMcPerson}!`, `You should try maintaining your sleep schedule if you're that really tired, ${PersonnyMcPerson}.`
]
} as const
}
}
// ty Noinkin for coming up with this suggestion/idea plus with bit of help <3
// 𝘢𝘭𝘴𝘰 𝘪𝘮 𝘯𝘰𝘵 𝘢 𝘣𝘰𝘺 :)

View File

@ -45,7 +45,7 @@ if (client.config.botSwitches.music){
if (client.config.botSwitches.mpstats) setInterval(async()=>{ if (client.config.botSwitches.mpstats) setInterval(async()=>{
const serverlake = (await client.MPServer._content.findById(client.config.mainServer.id)); const serverlake = (await client.MPServer._content.findById(client.config.mainServer.id));
for await (const [locName, locArea] of Object.entries(client.config.MPStatsLocation)) await MPLoop(client, locArea.channel, locArea.message, serverlake[locName], locName) for await (const [locName, locArea] of Object.entries(client.config.MPStatsLocation)) await MPLoop(client, locArea.channel, locArea.message, serverlake[locName], locName)
}, 30000); }, 35000);
setInterval(async()=>{ setInterval(async()=>{
client.YTLoop('UCQ8k8yTDLITldfWYKDs3xFg', 'Daggerwin', '528967918772551702'); // 528967918772551702 = #videos-and-streams client.YTLoop('UCQ8k8yTDLITldfWYKDs3xFg', 'Daggerwin', '528967918772551702'); // 528967918772551702 = #videos-and-streams
client.YTLoop('UCguI73--UraJpso4NizXNzA', 'Machinery Restorer', '767444045520961567') // 767444045520961567 = #machinery-restorer client.YTLoop('UCguI73--UraJpso4NizXNzA', 'Machinery Restorer', '767444045520961567') // 767444045520961567 = #machinery-restorer

View File

@ -393,10 +393,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/node@npm:20.5.6": "@types/node@npm:20.5.7":
version: 20.5.6 version: 20.5.7
resolution: "@types/node@npm:20.5.6" resolution: "@types/node@npm:20.5.7"
checksum: d2ce44f1cfa3fd00fe7426f7cf9a46d680cd57802b874ed5618e7d9101a9c6b8de37f08c0e7185ee06fb363ad492549c3ea69665c7e8e31c7813210ed8e89005 checksum: fc284c8e16ddc04569730d58e87eae349eb1c3dd9020cb79a1862d9d9add6f04e7367a236f3252db8db2572f90278e250f4cd43d27d264972b54394eaba1ed76
languageName: node languageName: node
linkType: hard linkType: hard
@ -737,16 +737,16 @@ __metadata:
"@octokit/auth-token": 4.0.0 "@octokit/auth-token": 4.0.0
"@octokit/rest": 20.0.1 "@octokit/rest": 20.0.1
"@types/ms": 0.7.31 "@types/ms": 0.7.31
"@types/node": 20.5.6 "@types/node": 20.5.7
canvas: 2.11.2 canvas: 2.11.2
discord-player: 6.6.2 discord-player: 6.6.2
discord.js: 14.13.0 discord.js: 14.13.0
libsodium-wrappers: 0.7.11 libsodium-wrappers: 0.7.11
moment: 2.29.4 moment: 2.29.4
mongoose: 7.4.4 mongoose: 7.4.5
ms: 2.1.3 ms: 2.1.3
prism-media: 1.3.5 prism-media: 1.3.5
systeminformation: 5.19.1 systeminformation: 5.21.0
typescript: 5.2.2 typescript: 5.2.2
xml-js: 1.6.11 xml-js: 1.6.11
youtube-sr: 4.3.4 youtube-sr: 4.3.4
@ -1577,9 +1577,9 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"mongoose@npm:7.4.4": "mongoose@npm:7.4.5":
version: 7.4.4 version: 7.4.5
resolution: "mongoose@npm:7.4.4" resolution: "mongoose@npm:7.4.5"
dependencies: dependencies:
bson: ^5.4.0 bson: ^5.4.0
kareem: 2.5.1 kareem: 2.5.1
@ -1588,7 +1588,7 @@ __metadata:
mquery: 5.0.0 mquery: 5.0.0
ms: 2.1.3 ms: 2.1.3
sift: 16.0.1 sift: 16.0.1
checksum: 54d014b4359c669027561a0570adca43c21a3e0fd22435e845d969274954057ee119088fa138e80f7199a49ccb48c516bde57848c468587eea1bfa51f767e224 checksum: a017bd90bbdf64bf2867abfb0ba5fe84049bf09f8bca53af465a3ad694abd9475c1140041910af8ac86b1185d00ec02fd4c936ffc05b9f67ba8c4b9b246a7a7e
languageName: node languageName: node
linkType: hard linkType: hard
@ -2175,12 +2175,12 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"systeminformation@npm:5.19.1": "systeminformation@npm:5.21.0":
version: 5.19.1 version: 5.21.0
resolution: "systeminformation@npm:5.19.1" resolution: "systeminformation@npm:5.21.0"
bin: bin:
systeminformation: lib/cli.js systeminformation: lib/cli.js
checksum: 0e02fbc1082f29732c69ba464069df6d1efb53385d394ba40d55292ab2cf88b2240095908774535adc9244f369a0f52c7aadb7114dd6895243538b263840c27c checksum: 0d6f22ed92c6e92167a27af5dcc5f1a9c0b2b82a33f9e674f9b2a6c1ebb79141ba405b8bde8e624101766c5d7ef087f50c45411d00690513e38f77e654f468cf
conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android) conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android)
languageName: node languageName: node
linkType: hard linkType: hard