Command that shows how much was donated to teamseas to help remove trash from the ocean
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const axios = require('axios');
if (context.params.event.content.startsWith('!teamseas')) {
const {data} = await axios('https://tscache.com/donation_total.json');
const givenNumber = data.count;
internationalNumberFormat = new Intl.NumberFormat('en-US')
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: context.params.event.channel_id,
content: "",
embed: {
type: 'rich',
title: 'Donate here',
url: 'https://teamseas.org',
description: internationalNumberFormat.format(givenNumber) + " Pounds Removed!!",
color: 0x1b00ff,
},
});
}