Remove unused message variables in commands

This commit is contained in:
Christer Warén 2023-06-06 07:10:21 +03:00
parent c181066c67
commit 7ba5ee97a8
8 changed files with 3 additions and 9 deletions

View File

@ -12,7 +12,6 @@ export default {
ephemeral: true ephemeral: true
}); });
let message: any = {};
const embed = new EmbedBuilder() const embed = new EmbedBuilder()
.setTitle(client.messages.replace(client.messages.inviteTitle, { .setTitle(client.messages.replace(client.messages.inviteTitle, {
"%client.user.username%": client.user.username "%client.user.username%": client.user.username

View File

@ -6,7 +6,6 @@ export default {
description: 'List radio stations', description: 'List radio stations',
category: 'radio', category: 'radio',
execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
let message: any = {};
if(!client.stations) { if(!client.stations) {
return interaction.reply({ return interaction.reply({

View File

@ -11,7 +11,6 @@ export default {
description: 'Bot Maintenance', description: 'Bot Maintenance',
category: 'info', category: 'info',
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
let message: any = {};
if(!client.funcs.isDev(client.config.devIDs, interaction.user.id)) return interaction.reply({ if(!client.funcs.isDev(client.config.devIDs, interaction.user.id)) return interaction.reply({
content: client.messages.emojis["error"] + client.messages.notAllowed, content: client.messages.emojis["error"] + client.messages.notAllowed,

View File

@ -7,7 +7,7 @@ export default {
category: 'radio', category: 'radio',
async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: any) { async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: any) {
if(client.funcs.check(client, interaction, command)) { if(client.funcs.check(client, interaction, command)) {
let message: any = {};
const radio = client.radio?.get(interaction.guild?.id); const radio = client.radio?.get(interaction.guild?.id);
let date = new Date(); let date = new Date();

View File

@ -11,7 +11,6 @@ export default {
], ],
category: "radio", category: "radio",
async execute(interaction: ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { async execute(interaction: ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
let message: any = {};
if(!client.stations) { if(!client.stations) {
return interaction.reply({ return interaction.reply({

View File

@ -7,7 +7,6 @@ export default {
description: 'Show statistics', description: 'Show statistics',
category: 'info', category: 'info',
execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) {
let message: any = {};
if(!interaction.guild) return interaction.reply({ if(!interaction.guild) return interaction.reply({
content: client.messages.emojis["error"] + client.messages.maintenance, content: client.messages.emojis["error"] + client.messages.maintenance,

View File

@ -6,14 +6,12 @@ export default {
description: 'Bot Status', description: 'Bot Status',
category: 'info', category: 'info',
async execute(interaction: any, client: RadioClient) { async execute(interaction: any, client: RadioClient) {
let message: any = {};
if(!client.user) return interaction.reply({ if(!client.user) return interaction.reply({
content: client.messages.emojis["error"] + client.messages.maintenance, content: client.messages.emojis["error"] + client.messages.maintenance,
ephemeral: true ephemeral: true
}); });
message.statusTitle = client.messages.statusTitle.replace("%client.user.username%", client.user.username);
let uptime = client.funcs.msToTime(client.uptime || 0); let uptime = client.funcs.msToTime(client.uptime || 0);
const embed = new EmbedBuilder() const embed = new EmbedBuilder()

View File

@ -1,7 +1,8 @@
import RadioClient from "../../Client"; import RadioClient from "../../Client";
import { command } from "../commands"; import { command } from "../commands";
export default function check(client: RadioClient, interaction: any, command: command) { export default function check(client: RadioClient, interaction: any, command: command) {
let message: any = {};
const radio = client.radio?.get(interaction.guild.id); const radio = client.radio?.get(interaction.guild.id);
if(!client.stations) { if(!client.stations) {
interaction.reply({ interaction.reply({