mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Compare commits
2 Commits
5a6c5a4a9c
...
54db88fbbf
Author | SHA1 | Date | |
---|---|---|---|
|
54db88fbbf | ||
|
7241834dab |
@ -12,7 +12,8 @@ import MPServer from './models/MPServer.js';
|
|||||||
import xjs from 'xml-js';
|
import xjs from 'xml-js';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import tokens from './tokens.json' assert {type: 'json'};
|
const tokens = JSON.parse(readFileSync('src/tokens.json', {encoding:'utf8'}));
|
||||||
|
// Import assertion warning workaround yes
|
||||||
|
|
||||||
let importconfig:Config
|
let importconfig:Config
|
||||||
try{
|
try{
|
||||||
|
@ -139,7 +139,7 @@ export default {
|
|||||||
interaction.reply({embeds: [
|
interaction.reply({embeds: [
|
||||||
new client.embed().setTitle('Ranking leaderboard')
|
new client.embed().setTitle('Ranking leaderboard')
|
||||||
.setDescription(`Level System was created **${Math.floor((Date.now()-client.config.LRSstart)/1000/60/60/24)}** days ago. Since then, a total of **${allData.reduce((a, b)=>a+b.messages, 0).toLocaleString('en-US')}** messages have been sent in this server.`)
|
.setDescription(`Level System was created **${Math.floor((Date.now()-client.config.LRSstart)/1000/60/60/24)}** days ago. Since then, a total of **${allData.reduce((a, b)=>a+b.messages, 0).toLocaleString('en-US')}** messages have been sent in this server.`)
|
||||||
.addFields({name: 'Top users by messages sent:', value: allData.sort((a,b)=>b.messages - a.messages).slice(0,10).map((x,i)=>`\`${i+1}.\` <@${x._id}>: ${x.messages.toLocaleString('en-US')}`).join('\n')})
|
.addFields({name: 'Top users by messages sent:', value: allData.sort((a,b)=>b.messages - a.messages).slice(0,10).map((x,i)=>`${i+1}. <@${x._id}>: ${x.messages.toLocaleString('en-US')}`).join('\n')})
|
||||||
.setImage('attachment://dailymsgs.png').setColor(client.config.embedColor)
|
.setImage('attachment://dailymsgs.png').setColor(client.config.embedColor)
|
||||||
.setFooter({text: 'Graph updates daily.'})
|
.setFooter({text: 'Graph updates daily.'})
|
||||||
], files: [new client.attachmentBuilder(img.toBuffer(),{name: 'dailymsgs.png'})]})
|
], files: [new client.attachmentBuilder(img.toBuffer(),{name: 'dailymsgs.png'})]})
|
||||||
|
Loading…
Reference in New Issue
Block a user