1
0
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. "af6925337f0c7fdac9ec0749f72ff3338b15c0df" and "a4d693aa4391b4c31c46d097470982cfc5b8ae7c" have entirely different histories.

4 changed files with 7 additions and 8 deletions

View File

@ -61,7 +61,7 @@ export default async(client:TClient,Channel:string,Message:string,ServerName:str
var n = Number(number); var n = Number(number);
return n.toLocaleString(undefined, {minimumFractionDigits: digits})+icon return n.toLocaleString(undefined, {minimumFractionDigits: digits})+icon
} }
// Join/Leave log // Join/Leave log - Dorime to tae for examples :dorime:
function playerLogEmbed(player:FSPlayer,joinLog:boolean){ function playerLogEmbed(player:FSPlayer,joinLog:boolean){
const logEmbed = new client.embed().setDescription(`**${player.name} ${player.isAdmin ? '| admin' : ''}** ${joinLog ? 'joined' : 'left'} **${ServerName}** at <t:${Math.round(Date.now()/1000)}:t>`); const logEmbed = new client.embed().setDescription(`**${player.name} ${player.isAdmin ? '| admin' : ''}** ${joinLog ? 'joined' : 'left'} **${ServerName}** at <t:${Math.round(Date.now()/1000)}:t>`);
if (joinLog) return logEmbed.setColor(client.config.embedColorGreen); if (joinLog) return logEmbed.setColor(client.config.embedColorGreen);

View File

@ -84,7 +84,7 @@ export default class TClient extends Client {
this.MPServerCache = {players: [], status: null, name: null} as MPServerCache; this.MPServerCache = {players: [], status: null, name: null} as MPServerCache;
this.suggestion = new suggestion(this); this.suggestion = new suggestion(this);
this.repeatedMessages = {}; this.repeatedMessages = {};
this.setMaxListeners(45); this.setMaxListeners(20);
this.statsGraph = -60; this.statsGraph = -60;
} }
async init(){ async init(){
@ -216,3 +216,4 @@ export class WClient extends WebhookClient {
this.tokens = tokens as Tokens; this.tokens = tokens as Tokens;
} }
} }
// hi tae, ik you went to look for secret hello msgs in here too.

View File

@ -3,7 +3,7 @@ import TClient from 'src/client';
export default { export default {
async run(client:TClient, message:Discord.Message){ async run(client:TClient, message:Discord.Message){
if (message.author.bot || message.channel.type === Discord.ChannelType.DM) return; if (message.author.bot || message.channel.type === Discord.ChannelType.DM) return;
const msgarr = message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?1234567890]/g, '').split(' '); const msgarr = message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n]/g, ' ').split(' ');
let automodded: boolean; let automodded: boolean;
const Whitelist = [] // Array of channel ids for automod to be disabled in (Disables bannedWords and advertisement, mind you.) const Whitelist = [] // Array of channel ids for automod to be disabled in (Disables bannedWords and advertisement, mind you.)
@ -81,8 +81,7 @@ export default {
'Nuh! No morning message for you!\n*Just kidding, good morning!*', `Rise and shine, ${PersonnyMcPerson}.`, 'Howdy! How\'s your morning?', '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', `*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()}!`, `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!`, '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!'
] ]
const AfternoonPhrases = [ const AfternoonPhrases = [
`Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`, `Afternoon ${PersonnyMcPerson}!`, `What a nice day outside, ${PersonnyMcPerson}`, `Good afternoon ${PersonnyMcPerson}`,
@ -99,8 +98,7 @@ export default {
const NightPhrases = [ const NightPhrases = [
`Good night ${PersonnyMcPerson}!`, `Night ${PersonnyMcPerson}!`, `Sweet dreams, ${PersonnyMcPerson}.`, `Don't fall out of sky in your dreamworld, ${PersonnyMcPerson}!`, `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}`, '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!`, `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>');

View File

@ -21,7 +21,7 @@ client.on('ready', async()=>{
}; };
console.log(`${client.user.username} has logged into Discord API`); console.log(`${client.user.username} has logged into Discord API`);
console.log(client.config.botSwitches, client.config.whitelistedServers); console.log(client.config.botSwitches, client.config.whitelistedServers);
(client.channels.resolve(client.config.mainServer.channels.bot_status) as Discord.TextChannel).send({content: `${client.user.username} is active`, embeds:[new client.embed().setColor(client.config.embedColor).setDescription(`\`\`\`json\n${Object.entries(client.config.botSwitches).map(x=>`${x[0]}: ${x[1]}`).join('\n')}\`\`\``)]}); (client.channels.resolve(client.config.mainServer.channels.bot_status) as Discord.TextChannel).send({content: `${client.user.username} is active`, embeds:[new client.embed().setColor(client.config.embedColor).setDescription(`\`\`\`json\n${Object.entries(client.config.botSwitches).map(hiTae=>`${hiTae[0]}: ${hiTae[1]}`).join('\n')}\`\`\``)]});
console.timeEnd('Startup') console.timeEnd('Startup')
}) })