mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 08:20:58 -05:00
Compare commits
No commits in common. "96c3d6cbaa51fc298f001491a9384d8b643b7225" and "af6925337f0c7fdac9ec0749f72ff3338b15c0df" have entirely different histories.
96c3d6cbaa
...
af6925337f
@ -115,7 +115,7 @@ export default {
|
|||||||
},
|
},
|
||||||
statsgraph: ()=>{
|
statsgraph: ()=>{
|
||||||
client.statsGraph = -(interaction.options.getInteger('number', true));
|
client.statsGraph = -(interaction.options.getInteger('number', true));
|
||||||
interaction.reply(`Successfully set to \`${client.statsGraph}\`\n*Total data points: **${JSON.parse(fs.readFileSync('src/database/MPPlayerData.json', {encoding: 'utf8'})).length.toLocaleString()}***`)
|
interaction.reply(`Successfully set to \`${client.statsGraph}\`\n*Total data points: **${JSON.parse(fs.readFileSync(path.join(__dirname, '../database/MPPlayerData.json'), {encoding: 'utf8'})).length.toLocaleString()}***`)
|
||||||
},
|
},
|
||||||
logs: ()=>{
|
logs: ()=>{
|
||||||
interaction.deferReply();
|
interaction.deferReply();
|
||||||
|
@ -5,7 +5,6 @@ import TClient from '../client.js';
|
|||||||
import os from 'node:os';
|
import os from 'node:os';
|
||||||
export default {
|
export default {
|
||||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||||
const waitForData = await interaction.reply({content: '<a:sakjdfsajkfhsdjhjfsa:1065342869428252743>', fetchReply:true})
|
|
||||||
// Bytes conversion
|
// Bytes conversion
|
||||||
function formatBytes(bytes:number, decimals:number = 2) {
|
function formatBytes(bytes:number, decimals:number = 2) {
|
||||||
if (bytes === 0) return '0 Bytes';
|
if (bytes === 0) return '0 Bytes';
|
||||||
@ -62,7 +61,7 @@ export default {
|
|||||||
`**Uptime:**\nHost: ${client.formatTime((os.uptime()*1000), 2, {longNames: true, commas: true})}\nBot: ${client.formatTime(client.uptime as number, 2, {commas: true, longNames: true})}`
|
`**Uptime:**\nHost: ${client.formatTime((os.uptime()*1000), 2, {longNames: true, commas: true})}\nBot: ${client.formatTime(client.uptime as number, 2, {commas: true, longNames: true})}`
|
||||||
].join('\n')}
|
].join('\n')}
|
||||||
);
|
);
|
||||||
waitForData.edit({content:null,embeds:[embed]}).then(x=>x.edit({embeds:[new client.embed(x.embeds[0].data).setFooter({text: `Load time: ${client.formatTime(x.createdTimestamp - interaction.createdTimestamp, 2, {longNames: true, commas: true})}`})]}))
|
interaction.reply({embeds: [embed], fetchReply: true}).then(x=>x.edit({embeds: [new client.embed(x.embeds[0].data).setFooter({text: `Load time: ${client.formatTime(x.createdTimestamp - interaction.createdTimestamp, 2, {longNames: true, commas: true})}`})]}))
|
||||||
},
|
},
|
||||||
data: new Discord.SlashCommandBuilder()
|
data: new Discord.SlashCommandBuilder()
|
||||||
.setName('statistics')
|
.setName('statistics')
|
||||||
|
@ -52,71 +52,69 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.guildId === client.config.mainServer.id && !automodded) client.userLevels.incrementUser(message.author.id)
|
if (message.guildId == client.config.mainServer.id && !automodded) client.userLevels.incrementUser(message.author.id)
|
||||||
// Mop gifs from banned channels without Monster having to mop them.
|
// Mop gifs from banned channels without Monster having to mop them.
|
||||||
const bannedChannels = [
|
const bannedChannels = [
|
||||||
'516344221452599306', // #mp-moderators
|
'516344221452599306', // #mp-moderators
|
||||||
'742324777934520350', // #discord-moderators
|
'742324777934520350', // #discord-moderators
|
||||||
]
|
]
|
||||||
if (['tenor.com/view', 'giphy.com/gifs', 'giphy.com/media'].some(e=>message.content.toLowerCase().includes(e)) && bannedChannels.includes(message.channelId)) message.reply('Gifs are not allowed in this channel.').then(()=>message.delete())
|
const gifURL = ['tenor.com/view', 'giphy.com/gifs', 'giphy.com/media']
|
||||||
|
if (gifURL.some(e=>message.content.toLowerCase().includes(e)) && bannedChannels.includes(message.channelId)) message.reply('Gifs are not allowed in this channel.').then((msg)=>message.delete())
|
||||||
|
|
||||||
// Autoresponse:tm:
|
// Autoresponse:tm:
|
||||||
if (client.config.botSwitches.autores && !automodded) {
|
if (client.config.botSwitches.autores && !automodded) {
|
||||||
|
const MorningArray = ['good morning all', 'good morning everyone', 'morning all', 'morning everyone', 'morning lads', 'morning guys', 'good morning everybody']
|
||||||
|
const AfternoonArray = ['good afternoon', 'afternoon all', 'afternoon everyone']
|
||||||
|
const EveningArray = ['good evening', 'evening all', 'evening everyone']
|
||||||
|
const NightArray = ['night all', 'night everyone', 'night guys']
|
||||||
|
const PasswordArray = ['whats the password', 'what\'s the password', 'password pls']
|
||||||
|
const cantRead = ['i cant read', 'i can\'t read', 'cant read', 'can\'t read']
|
||||||
|
const TheyBrokeIt = ['break', 'broke', 'broken']
|
||||||
|
const deadChat = ['dead chat', 'chat is dead', 'dead server', 'inactive chat', 'inactive channel']
|
||||||
|
|
||||||
const PersonnyMcPerson = `**${message.member.displayName}**`;
|
const PersonnyMcPerson = `**${message.member.displayName}**`;
|
||||||
const GeneralChatID = '468835415093411863';
|
const GeneralChatID = '468835415093411863';
|
||||||
const incomingArrays = {
|
const MorningPhrases = [
|
||||||
morning: ['good morning all', 'good morning everyone', 'morning all', 'morning everyone', 'morning lads', 'morning guys', 'good morning everybody'],
|
`Morning ${PersonnyMcPerson}, did you sleep great?`, `Good morning ${PersonnyMcPerson}!`, `Hope you enjoyed your breakfast, ${PersonnyMcPerson}!`,
|
||||||
afternoon: ['good afternoon', 'afternoon all', 'afternoon everyone'],
|
`Gm ${PersonnyMcPerson}.`, `Uh.. What time is it? Oh yea, morning ${PersonnyMcPerson}.`, `Morning and hope you had a good dream last night, ${PersonnyMcPerson}.`,
|
||||||
evening: ['good evening', 'evening all', 'evening everyone'],
|
'Time to get started with today\'s stuff!', `Don't forget to do your morning routine, ${PersonnyMcPerson}!`, 'Enjoy the breakfast and start your day.',
|
||||||
night: ['night all', 'night everyone', 'night guys', 'goodnight', 'good night'],
|
'Nuh! No morning message for you!\n*Just kidding, good morning!*', `Rise and shine, ${PersonnyMcPerson}.`, 'Howdy! How\'s your morning?',
|
||||||
password: ['whats the password', 'what\'s the password', 'password pls'],
|
`*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',
|
||||||
cantRead: ['i cant read', 'i can\'t read', 'cant read', 'can\'t read'],
|
`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()}!`,
|
||||||
theyBrokeIt: ['break', 'broke', 'broken'],
|
'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!`,
|
||||||
deadChat: ['dead chat', 'chat is dead', 'dead server', 'inactive chat', 'inactive channel']
|
`## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!'
|
||||||
}
|
]
|
||||||
const outgoingArrays = {
|
const AfternoonPhrases = [
|
||||||
morning: [
|
`Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`,
|
||||||
`Morning ${PersonnyMcPerson}, did you sleep great?`, `Good morning ${PersonnyMcPerson}!`, `Hope you enjoyed your breakfast, ${PersonnyMcPerson}!`,
|
'Hope you had a good day so far.', `Did you enjoy your day yet, ${PersonnyMcPerson}?`, 'Weather doesn\'t look too bad outside right?',
|
||||||
`Gm ${PersonnyMcPerson}.`, `Uh.. What time is it? Oh yea, morning ${PersonnyMcPerson}.`, `Morning and hope you had a good dream last night, ${PersonnyMcPerson}.`,
|
`How's the trip outside, ${PersonnyMcPerson}?`, `~~Morning~~ Afternoon ${PersonnyMcPerson}!`, 'Afternoon already? Jeez, time go brrrr!',
|
||||||
'Time to get started with today\'s stuff!', `Don't forget to do your morning routine, ${PersonnyMcPerson}!`, 'Enjoy the breakfast and start your day.',
|
'We\'re halfway through the day, aren\'t we?'
|
||||||
'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',
|
const EveningPhrases = [
|
||||||
`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()}!`,
|
'I can\'t believe the time flies so quickly!', `Evening ${PersonnyMcPerson}!`, `Hope you enjoyed the dinner, ${PersonnyMcPerson}!`,
|
||||||
'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!`,
|
`Good evening ${PersonnyMcPerson}!`, 'You look tired, ready to go to sleep yet?', 'Being outside was an exhausting task isn\'t it?',
|
||||||
`## Morning ${PersonnyMcPerson}!`, '### Have a wonderful day ahead of you!'
|
'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!'
|
||||||
afternoon: [
|
]
|
||||||
`Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`,
|
const NightPhrases = [
|
||||||
'Hope you had a good day so far.', `Did you enjoy your day yet, ${PersonnyMcPerson}?`, 'Weather doesn\'t look too bad outside right?',
|
`Good night ${PersonnyMcPerson}!`, `Night ${PersonnyMcPerson}!`, `Sweet dreams, ${PersonnyMcPerson}.`, `Don't fall out of sky in your dreamworld, ${PersonnyMcPerson}!`,
|
||||||
`How's the trip outside, ${PersonnyMcPerson}?`, `~~Morning~~ Afternoon ${PersonnyMcPerson}!`, 'Afternoon already? Jeez, time go brrrr!',
|
'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}`,
|
||||||
'We\'re halfway through the day, aren\'t we?'
|
`Sleep well ${PersonnyMcPerson}.`, `Gn ${PersonnyMcPerson}.`, `Close your eyelids and sleep, ${PersonnyMcPerson}.`, `Good night ${PersonnyMcPerson} and hope your pillow is nice and cold!`,
|
||||||
],
|
`# Night ${PersonnyMcPerson}!`
|
||||||
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}!`
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
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!');
|
||||||
if (incomingArrays.password.some(e=>message.content.toLowerCase().includes(e))) message.reply('Password and other details can be found in <#543494084363288637>');
|
if (PasswordArray.some(e=>message.content.toLowerCase().includes(e))) message.reply('Password and other details can be found in <#543494084363288637>');
|
||||||
if (incomingArrays.cantRead.some(e=>message.content.toLowerCase().includes(e))) message.reply('https://tenor.com/view/aristocats-george-pen-cap-meticulous-gif-5330931');
|
if (cantRead.some(e=>message.content.toLowerCase().includes(e))) message.reply('https://tenor.com/view/aristocats-george-pen-cap-meticulous-gif-5330931');
|
||||||
if (message.content.toLowerCase().includes('is daggerbot working')) message.reply('https://tenor.com/view/i-still-feel-alive-living-existing-active-singing-gif-14630579');
|
if (message.content.toLowerCase().includes('is daggerbot working')) message.reply('https://tenor.com/view/i-still-feel-alive-living-existing-active-singing-gif-14630579');
|
||||||
if (incomingArrays.deadChat.some(e=>message.content.toLowerCase().includes(e))) message.reply('https://cdn.discordapp.com/attachments/925589318276382720/1011333656167579849/F57G5ZS.png');
|
if (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') && 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') && 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 (MorningArray.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${MorningPhrases[Math.floor(Math.random()*MorningPhrases.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 (AfternoonArray.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${AfternoonPhrases[Math.floor(Math.random()*AfternoonPhrases.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 (EveningArray.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${EveningPhrases[Math.floor(Math.random()*EveningPhrases.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)]}`);
|
if (NightArray.some(e=>message.content.toLowerCase().startsWith(e)) && message.channelId == GeneralChatID && message.type == 0) message.reply(`${NightPhrases[Math.floor(Math.random()*NightPhrases.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}\`\`\``));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user