mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Compare commits
3 Commits
084e20938f
...
a4d693aa43
Author | SHA1 | Date | |
---|---|---|---|
|
a4d693aa43 | ||
|
5192a7c93c | ||
|
14b13dd190 |
10
package.json
10
package.json
@ -24,20 +24,20 @@
|
|||||||
"node": ">=18.12.0"
|
"node": ">=18.12.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "1.3.5",
|
"axios": "1.4.0",
|
||||||
"canvas": "2.11.2",
|
"canvas": "2.11.2",
|
||||||
"discord.js": "14.11.0",
|
"discord.js": "14.11.0",
|
||||||
"moment": "2.29.4",
|
"moment": "2.29.4",
|
||||||
"ms": "2.1.3",
|
"ms": "2.1.3",
|
||||||
"mongoose": "7.2.2",
|
"mongoose": "7.2.3",
|
||||||
"systeminformation": "5.17.16",
|
"systeminformation": "5.18.3",
|
||||||
"@octokit/rest": "19.0.11",
|
"@octokit/rest": "19.0.11",
|
||||||
"@octokit/auth-token": "3.0.3",
|
"@octokit/auth-token": "3.0.4",
|
||||||
"typescript": "5.1.3",
|
"typescript": "5.1.3",
|
||||||
"xml-js": "1.6.11"
|
"xml-js": "1.6.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ms": "0.7.31",
|
"@types/ms": "0.7.31",
|
||||||
"@types/node": "20.2.5"
|
"@types/node": "20.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ async function MPdata(client:TClient, interaction:Discord.ChatInputCommandIntera
|
|||||||
embed.setTitle('Host is not responding.');
|
embed.setTitle('Host is not responding.');
|
||||||
embed.setColor(client.config.embedColorRed);
|
embed.setColor(client.config.embedColorRed);
|
||||||
console.log(client.logTime(), 'DagMP failed to fetch, host didn\'t respond in time.');
|
console.log(client.logTime(), 'DagMP failed to fetch, host didn\'t respond in time.');
|
||||||
return interaction.reply('Server didn\'t respond in time.');
|
return interaction.reply('Server didn\'t respond in time, please try again later.');
|
||||||
} return FSserver
|
} return FSserver
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ export default {
|
|||||||
const MPURL = await client.MPServer._content.findById(interaction.guildId);
|
const MPURL = await client.MPServer._content.findById(interaction.guildId);
|
||||||
if (FSserver2.data.server.name.length == 0) embed2.setFooter({text: 'Server is currently offline.'})
|
if (FSserver2.data.server.name.length == 0) embed2.setFooter({text: 'Server is currently offline.'})
|
||||||
interaction.reply({embeds: [embed2.setDescription([
|
interaction.reply({embeds: [embed2.setDescription([
|
||||||
`**Server name**: \`${FSserver2?.data.server.name.length == 0 ? '\u200b' : FSserver2?.data.server.name}\``,
|
`**Server name**: \`${FSserver2?.data.server.name.length === 0 ? '\u200b' : FSserver2?.data.server.name}\``,
|
||||||
'**Password:** `mf4700`',
|
'**Password:** `mf4700`',
|
||||||
'**Crossplay server**',
|
'**Crossplay server**',
|
||||||
`**Map:** ${FSserver2.data.server.mapName.length == 0 ? 'Null Island' : FSserver2.data.server.mapName}`,
|
`**Map:** ${FSserver2.data.server.mapName.length == 0 ? 'Null Island' : FSserver2.data.server.mapName}`,
|
||||||
|
@ -24,7 +24,7 @@ export default {
|
|||||||
const index = allData.sort((a, b) => b.messages - a.messages).map(x => x._id).indexOf(member.id) + 1;
|
const index = allData.sort((a, b) => b.messages - a.messages).map(x => x._id).indexOf(member.id) + 1;
|
||||||
const memberDifference = userData.messages - client.userLevels.algorithm(userData.level);
|
const memberDifference = userData.messages - client.userLevels.algorithm(userData.level);
|
||||||
const levelDifference = client.userLevels.algorithm(userData.level+1) - client.userLevels.algorithm(userData.level);
|
const levelDifference = client.userLevels.algorithm(userData.level+1) - client.userLevels.algorithm(userData.level);
|
||||||
interaction.reply({embeds: [new client.embed().setColor(member.displayColor).setTitle(`Level: **${userData.level}**\nRank: **${index ? '#' + index : 'last'}**\nProgress: **${memberDifference}/${levelDifference} (${(memberDifference/levelDifference*100).toFixed(2)}%)**\nTotal: **${userData.messages}**`).setThumbnail(member.user.avatarURL({ extension: 'png', size: 256}) || member.user.defaultAvatarURL)]})
|
interaction.reply({embeds: [new client.embed().setColor(member.displayColor).setTitle(`Level: **${userData.level}**\nRank: **${index ? '#' + index : 'last'}**\nProgress: **${memberDifference}/${levelDifference} (${(memberDifference/levelDifference*100).toFixed(2)}%)**\nTotal: **${userData.messages.toLocaleString('en-US')}**`).setThumbnail(member.avatarURL({extension:'png',size:1024}) || member.user.avatarURL({extension:'png',size:1024}) || member.user.defaultAvatarURL)]})
|
||||||
},
|
},
|
||||||
leaderboard: ()=>{
|
leaderboard: ()=>{
|
||||||
const messageCountsTotal = allData.reduce((a, b) => a + b.messages, 0);
|
const messageCountsTotal = allData.reduce((a, b) => a + b.messages, 0);
|
||||||
|
@ -19,7 +19,7 @@ export default {
|
|||||||
.setColor(client.config.embedColor)
|
.setColor(client.config.embedColor)
|
||||||
.setURL(`https://discord.com/users/${user.id}`)
|
.setURL(`https://discord.com/users/${user.id}`)
|
||||||
.setThumbnail(user.avatarURL({size:2048}) || user.defaultAvatarURL)
|
.setThumbnail(user.avatarURL({size:2048}) || user.defaultAvatarURL)
|
||||||
.setTitle(`${user.bot ? 'Bot': 'User'} Info: ${user.username}`)
|
.setTitle(`${user.bot ? 'Bot' : 'User'} Info: ${user.username}`)
|
||||||
.setDescription(`<@${user.id}>\n\`${user.id}\``)
|
.setDescription(`<@${user.id}>\n\`${user.id}\``)
|
||||||
.addFields({name: '🔹 Account Creation Date', value: `<t:${Math.round(user.createdTimestamp/1000)}>\n<t:${Math.round(user.createdTimestamp/1000)}:R>`})
|
.addFields({name: '🔹 Account Creation Date', value: `<t:${Math.round(user.createdTimestamp/1000)}>\n<t:${Math.round(user.createdTimestamp/1000)}:R>`})
|
||||||
interaction.reply({embeds: [embed]})
|
interaction.reply({embeds: [embed]})
|
||||||
@ -29,7 +29,7 @@ export default {
|
|||||||
const embedArray = [];
|
const embedArray = [];
|
||||||
let title = 'Member';
|
let title = 'Member';
|
||||||
if (member.user.bot) title = 'Bot';
|
if (member.user.bot) title = 'Bot';
|
||||||
else if (member.user.id == interaction.guild.ownerId) title = ':crown: Server Owner';
|
else if (member.user.id === interaction.guild.ownerId) title = ':crown: Server Owner';
|
||||||
|
|
||||||
const embed = new client.embed()
|
const embed = new client.embed()
|
||||||
.setColor(member.displayColor || client.config.embedColor)
|
.setColor(member.displayColor || client.config.embedColor)
|
||||||
|
Loading…
Reference in New Issue
Block a user