Removed all commands from dms

This commit is contained in:
2023-12-31 11:29:39 +01:00
parent b5eb58a4f1
commit 1abd1a7e9c
10 changed files with 32 additions and 89 deletions

View File

@@ -35,7 +35,8 @@ export = {
.setName("ign")
.setDescription("The player's IGN.")
.setRequired(true),
),
)
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply({})
@@ -285,13 +286,6 @@ export = {
const hypixelExp = player.networkExp || 0
const level = hypixelLevel(hypixelExp)
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
await interaction.editReply({
embeds: [
{
@@ -311,8 +305,8 @@ export = {
url: head!,
},
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon!,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: true })!,
},
fields: statsFields,
},

View File

@@ -79,7 +79,8 @@ export = {
"The amount of guild members to show. [Default: 10]",
),
),
),
)
.setDMPermission(false),
async execute(interaction) {
const subcommand = interaction.options.getSubcommand()
@@ -100,21 +101,14 @@ export = {
return
}
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: true })
await interaction.reply({
embeds: [
{
description: "This command is currently under development",
color: embedColor,
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon!,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
},
},
],

View File

@@ -191,13 +191,6 @@ async function guildInfo(
averageGuildMembersWeeklyXPUnformatted,
)
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
await interaction.editReply({
embeds: [
{
@@ -240,8 +233,8 @@ async function guildInfo(
],
color: embedColor,
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon!,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
},
},
],

View File

@@ -167,13 +167,6 @@ async function guildMember(
":" +
guildMemberJoinSeconds
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
await interaction.editReply({
embeds: [
{
@@ -210,8 +203,8 @@ async function guildMember(
},
],
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon!,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: false })!,
},
},
],

View File

@@ -263,12 +263,6 @@ async function guildTop(
}
})
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
const cacheStatusText = cacheStatus ? " | [Cache]" : ""
await interaction.editReply({
@@ -285,8 +279,8 @@ async function guildTop(
color: embedColor,
fields: newList,
footer: {
text: footerText + " | " + devMessage + cacheStatusText,
icon_url: footerIcon!,
text: interaction.guild!.name + " | " + devMessage + cacheStatusText,
icon_url: interaction.guild!.iconURL({ forceStatic: false })!,
},
},
],

View File

@@ -57,12 +57,6 @@ export = {
}
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
await interaction.editReply({
embeds: [
@@ -75,8 +69,8 @@ export = {
url: interaction.guild!.iconURL({ forceStatic: true, })!,
},
footer: {
icon_url: footerIcon!,
text: footerText + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: false})!,
text: interaction.guild!.name + " | " + devMessage,
},
},
],

View File

@@ -12,7 +12,8 @@ export = {
data: new SlashCommandBuilder()
.setName("instructions")
.setDescription("Instructions for verification")
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
async execute(interaction) {
const embedColor = Number(color.replace("#", "0x"))

View File

@@ -11,28 +11,22 @@ export = {
data: new SlashCommandBuilder()
.setName("ping")
.setDescription("Get's the bot's ping."),
.setDescription("Get's the bot's ping.")
.setDMPermission(false),
async execute(interaction, client) {
await interaction.deferReply()
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
await interaction.editReply({
embeds: [
{
description: "Ping of the bot is " + client.ws.ping + "ms.",
color: embedColor,
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon || undefined,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild?.iconURL({ forceStatic: false }) || undefined,
},
timestamp: new Date().toISOString(),
},

View File

@@ -20,20 +20,13 @@ export = {
data: new SlashCommandBuilder()
.setName("reqs")
.setDescription("Displays the requirements for the guild."),
.setDescription("Displays the requirements for the guild.")
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply({ ephemeral: true })
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
await interaction.editReply({
await interaction.reply({
embeds: [
{
title: "Requirements",
@@ -42,9 +35,7 @@ export = {
color: embedColor,
thumbnail: {
url:
interaction?.guild?.iconURL({
forceStatic: false,
}) || "",
interaction?.guild?.iconURL({ forceStatic: false, }) || "",
},
fields: [
{
@@ -78,8 +69,8 @@ export = {
},
],
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon || undefined,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
},
},
],

View File

@@ -18,7 +18,8 @@ export = {
.setName("ign")
.setDescription("Player's name")
.setRequired(true),
),
)
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply()
@@ -29,12 +30,6 @@ export = {
const newIgn = (await getIGN(uuid)) as string
const head = await getHeadURL(ign)
const embedColor = Number(color.replace("#", "0x"))
const footerText = interaction.guild
? interaction.guild.name
: interaction.user.username
const footerIcon = interaction.guild
? interaction.guild.iconURL({ forceStatic: false })
: interaction.user.avatarURL({ forceStatic: false })
if (!uuid) {
interaction.editReply({
@@ -64,8 +59,8 @@ export = {
url: head!,
},
footer: {
text: footerText + " | " + devMessage,
icon_url: footerIcon || undefined,
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild?.iconURL({ forceStatic: false }) || undefined,
},
},
],