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
});
let message: any = {};
const embed = new EmbedBuilder()
.setTitle(client.messages.replace(client.messages.inviteTitle, {
"%client.user.username%": client.user.username

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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