Skip to content

Commit

Permalink
trim comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaxking committed Nov 2, 2024
1 parent c5fd267 commit 07eca7a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/views/components/strategy/Comment.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
onMount(() => {
strategy.on('update', update);
comment = strategy.comment;
comment = strategy.comment.trim();
if (!comment) defaultComment();
return () => {
Expand Down
31 changes: 31 additions & 0 deletions scripts/SEND_EMAILS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { TBA } from "../server/utilities/tba/tba";
import { Loop } from "../shared/loop";
import { Email, EmailType } from "../server/utilities/email";

const main = async () => {
const loop = new Loop(async () => {
const matches = (await TBA.get<unknown[]>('/event/2024cabl/matches/simple')).unwrap();
console.log('Matches:', matches);
if (!matches) return;
if (matches.length === 0) return;
const e = new Email(
['[email protected]', '[email protected]', '[email protected]', '[email protected]'],
'Cabl Match Schedule Released',
EmailType.text,
{
constructor: {
message: 'The match schedule for the upcoming competition has been released. Please check the schedule to see when your team is competing.',
title: 'CABL Match Schedule Released',
}
}
);
console.log('Sending email');
(await e.send()).unwrap();
process.exit(0);
}, 5 * 60 * 1000);


loop.start();
};

main();

0 comments on commit 07eca7a

Please sign in to comment.