Replace ' with `
This commit is contained in:
parent
ec7e5bb86f
commit
53eec5bd14
|
@ -5,6 +5,6 @@ module.exports = {
|
||||||
.setName('server')
|
.setName('server')
|
||||||
.setDescription('Provides information about the server.'),
|
.setDescription('Provides information about the server.'),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.reply('This server is ${interaction.guild.name} and has ${interaction.guild.memberCount} members.');
|
await interaction.reply(`This server is ${interaction.guild.name} and has ${interaction.guild.memberCount} members.`);
|
||||||
},
|
},
|
||||||
};
|
};
|
|
@ -7,6 +7,6 @@ module.exports = {
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
// interaction.user is the object representing the user who ran the command
|
// interaction.user is the object representing the user who ran the command
|
||||||
// interaction.member is the GuildMember object, which represents the user in the specific guild
|
// interaction.member is the GuildMember object, which represents the user in the specific guild
|
||||||
await interaction.reply('This command was run by ${interaction.user.username}, who joined on ${interaction.member.joinedAt}.');
|
await interaction.reply(`This command was run by ${interaction.user.username}, who joined on ${interaction.member.joinedAt}.`);
|
||||||
},
|
},
|
||||||
};
|
};
|
4
index.js
4
index.js
|
@ -24,7 +24,7 @@ for (const folder of commandFolders) {
|
||||||
if ('data' in command && 'execute' in command) {
|
if ('data' in command && 'execute' in command) {
|
||||||
client.commands.set(command.data.name, command);
|
client.commands.set(command.data.name, command);
|
||||||
} else {
|
} else {
|
||||||
console.log('[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.');
|
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ client.on(Events.InteractionCreate, async interaction => {
|
||||||
const command = client.commands.get(interaction.commandName);
|
const command = client.commands.get(interaction.commandName);
|
||||||
|
|
||||||
if (!command) {
|
if (!command) {
|
||||||
console.error('No command matching ${interaction.commandName} was found.');
|
console.error(`No command matching ${interaction.commandName} was found.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue