Merge branch 'dev' into 'main'

Updated dm availabe commands

See merge request illegitimate/illegitimate-bot!107
This commit is contained in:
2023-11-30 15:38:54 +00:00
8 changed files with 64 additions and 46 deletions

View File

@@ -204,6 +204,9 @@ module.exports = {
const hypixelExp = player.networkExp || 0
const level = hypixelLevel(hypixelExp)
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [{
title: rank + player.displayname + guildTag,
@@ -215,8 +218,8 @@ module.exports = {
url: head
},
footer: {
text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction?.guild.iconURL() || interaction.user.avatarURL()
text: footerText,
icon_url: footerIcon
},
fields: statsFields
}]

View File

@@ -53,13 +53,16 @@ module.exports = {
return
}
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [{
description: "This command is currently under development",
color: embedColor,
footer: {
text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
text: footerText,
icon_url: footerIcon
}
}]
})

View File

@@ -70,6 +70,9 @@ async function guildInfo(interaction) {
const guildMembersDailyXP = Object.values(guildMembers).map((m) => m.expHistory[Object.keys(m.expHistory)[0]])
const totalGuildMembersDailyXP = guildMembersDailyXP.reduce((a, b) => a + b, 0)
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [{
title: "**Info on** " + guildName,
@@ -95,8 +98,8 @@ async function guildInfo(interaction) {
],
color: embedColor,
footer: {
text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
text: footerText,
icon_url: footerIcon
}
}]
})

View File

@@ -109,37 +109,38 @@ async function guildMember(interaction) {
guildMemberJoinMinutes + ":" +
guildMemberJoinSeconds
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [
{
title: rank + displayName + guildTag,
description: "**Guild Name:** `" + guildName + "`\n" +
"**Guild Rank:** `" + guildRank + "`\n",
color: embedColor,
thumbnail: {
url: head,
},
fields: [
{
name: "**Daily GEXP**",
value: expValue,
},
{
name: "**Weekly GEXP**",
value: "**➺ Total:** `" + totalWeeklyGexp + "`\n" +
"**➺ Daily avarage:** `" + averageWeeklyGexp + "`",
},
{
name: "**Join date**",
value: "**➺ **`" + guildMemberJoin + "`",
},
],
footer: {
text: interaction.guild.name + " | " + devMessage,
icon_url: interaction.guild.iconURL({ dynamic: true }),
},
embeds: [{
title: rank + displayName + guildTag,
description: "**Guild Name:** `" + guildName + "`\n" +
"**Guild Rank:** `" + guildRank + "`\n",
color: embedColor,
thumbnail: {
url: head,
},
],
fields: [
{
name: "**Daily GEXP**",
value: expValue,
},
{
name: "**Weekly GEXP**",
value: "**➺ Total:** `" + totalWeeklyGexp + "`\n" +
"**➺ Daily avarage:** `" + averageWeeklyGexp + "`",
},
{
name: "**Join date**",
value: "**➺ **`" + guildMemberJoin + "`",
},
],
footer: {
text: footerText,
icon_url: footerIcon
},
}],
})
}

View File

@@ -19,6 +19,9 @@ module.exports = {
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [{
title: "Commands",
@@ -43,11 +46,11 @@ module.exports = {
],
color: embedColor,
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
url: interaction?.guild.iconURL({ dynamic: true }) || null
},
footer: {
icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true }),
text: interaction?.guild.name || interaction.user.username + " | " + devMessage
icon_url: footerIcon,
text: footerText
}
}]
})

View File

@@ -1,5 +1,5 @@
const { SlashCommandBuilder } = require("discord.js")
const { color } = require("../../config/options.json")
const { color, devMessage } = require("../../config/options.json")
module.exports = {
name: "ping",
@@ -20,15 +20,16 @@ module.exports = {
const embedColor = Number(color.replace("#", "0x"))
console.log(client.ws.ping)
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [{
description: "Ping of the bot is " + client.ws.ping + "ms.",
color: embedColor,
footer: {
text: interaction?.guild.name || interaction.user.username,
icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
text: footerText,
icon_url: footerIcon
},
timestamp: new Date()
}]

View File

@@ -17,6 +17,8 @@ module.exports = {
await interaction.deferReply({ ephemeral: true })
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
await interaction.editReply({
embeds: [{
@@ -44,8 +46,8 @@ module.exports = {
}
],
footer: {
text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction?.guild.iconURL() || interaction.user.avatarURL()
text: footerText,
icon_url: footerIcon
}
}]
})

View File

@@ -28,6 +28,8 @@ module.exports = {
const newIgn = await getIGN(uuid)
const head = await getHeadURL(ign)
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild ? interaction.guild.name : interaction.user.username + " | " + devMessage
const footerIcon = interaction.guild ? interaction.guild.iconURL({ dynamic: true }) : interaction.user.avatarURL({ dynamic: true })
if (!uuid) {
interaction.editReply({
@@ -47,8 +49,8 @@ module.exports = {
url: head
},
footer: {
text: interaction?.guild.name || interaction.user.username + " | " + devMessage,
icon_url: interaction?.guild.iconURL({ dynamic: true }) || interaction.user.avatarURL({ dynamic: true })
text: footerText,
icon_url: footerIcon
}
}]
})