Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
coopw1 committed Jan 8, 2024
1 parent f95c4fb commit 7ec2780
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions src/commands/general/brainz.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,37 +438,37 @@ module.exports = {
}, 180_000);

// Handle the collector
collector.on("collect", async (buttoni) => {
collector.on("collect", async (buttonInteraction) => {
// Check if the button was love
if (buttoni.customId === "love") {
if (buttonInteraction.customId === "love") {
// User clicked love
if (score === 1) {
sendFeedback(0, listenBrainzToken, MBID, MSID);
buttonRow1.components[0].setStyle(ButtonStyle.Secondary);
buttonRow1.components[1].setStyle(ButtonStyle.Secondary);
buttoni.update({ components: [buttonRow1] });
buttonInteraction.update({ components: [buttonRow1] });
score = 0;
} else {
sendFeedback(1, listenBrainzToken, MBID, MSID);
buttonRow1.components[0].setStyle(ButtonStyle.Success);
buttonRow1.components[1].setStyle(ButtonStyle.Secondary);
buttoni.update({ components: [buttonRow1] });
buttonInteraction.update({ components: [buttonRow1] });
score = 1;
}
}
if (buttoni.customId === "unlove") {
if (buttonInteraction.customId === "unlove") {
// User clicked unlove
if (score === -1) {
sendFeedback(0, listenBrainzToken, MBID, MSID);
buttonRow1.components[0].setStyle(ButtonStyle.Secondary);
buttonRow1.components[1].setStyle(ButtonStyle.Secondary);
buttoni.update({ components: [buttonRow1] });
buttonInteraction.update({ components: [buttonRow1] });
score = 0;
} else {
sendFeedback(-1, listenBrainzToken, MBID, MSID);
buttonRow1.components[0].setStyle(ButtonStyle.Secondary);
buttonRow1.components[1].setStyle(ButtonStyle.Success);
buttoni.update({ components: [buttonRow1] });
buttonInteraction.update({ components: [buttonRow1] });
score = -1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/general/recent.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = {
);
// Create base embed
const baseEmbed = {
title: `Lastest tracks for ${brainzUsername}`,
title: `Latest tracks for ${brainzUsername}`,
color: 0x353070,
};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/misc/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
const ping = reply.createdTimestamp - interaction.createdTimestamp;

interaction.editReply(
`Pong! Client ${ping}ms | Websocked: ${client.ws.ping}ms`
`Pong! Client ${ping}ms | Websocket: ${client.ws.ping}ms`
);
},
};
14 changes: 7 additions & 7 deletions src/commands/userSettings/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ module.exports = {
}, 180_000);

// Handle the collector
collector.on("collect", async (buttoni) => {
collector.on("collect", async (buttonInteraction) => {
// Check if the button was continue
if (buttoni.customId === "continue") {
if (buttonInteraction.customId === "continue") {
// User clicked continue

// Generate a random customId
Expand Down Expand Up @@ -109,13 +109,13 @@ module.exports = {
modal.addComponents(row);

// Send the modal
await buttoni.showModal(modal);
await buttonInteraction.showModal(modal);

// Create a collector that waits for the user to submit the modal
const modalCollectorFilter = (modali) =>
modali.user.id === buttoni.user.id &&
modali.user.id === buttonInteraction.user.id &&
modali.customId === randomCustomId;
buttoni
buttonInteraction
.awaitModalSubmit({ time: 60_000, filter: modalCollectorFilter })
.then(async (i) => {
// User submitted the modal
Expand Down Expand Up @@ -182,7 +182,7 @@ module.exports = {
i.reply({ embeds: [embed], ephemeral: true });
}
});
} else if (buttoni.customId === "questionmark") {
} else if (buttonInteraction.customId === "questionmark") {
// User clicked questionmark
const embed = new EmbedBuilder()
.setTitle("Creating an account")
Expand All @@ -194,7 +194,7 @@ module.exports = {
)
.setColor(0xeb743b);
// Send embed
buttoni.reply({ embeds: [embed], ephemeral: true });
buttonInteraction.reply({ embeds: [embed], ephemeral: true });
}
});
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/events/interactionCreate/handleCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = async (client, interaction) => {
if (!devs.includes(interaction.member.id)) {
interaction.reply({
content: "Only developers are allowed to run this command.",
emphemeral: true,
ephemeral: true,
});
return;
}
Expand All @@ -26,7 +26,7 @@ module.exports = async (client, interaction) => {
if (!(interaction.guild.id === testServer)) {
interaction.reply({
content: "This command cannot run here.",
emphemeral: true,
ephemeral: true,
});
return;
}
Expand All @@ -36,7 +36,7 @@ module.exports = async (client, interaction) => {
if (!interaction.member.permission.has(permission)) {
interaction.reply({
content: "Not enough permissions.",
emphemeral: true,
ephemeral: true,
});
break;
}
Expand All @@ -50,7 +50,7 @@ module.exports = async (client, interaction) => {
if (!bot.permission.has(permission)) {
interaction.reply({
content: "I don't have enough permissions.",
emphemeral: true,
ephemeral: true,
});
break;
}
Expand Down

0 comments on commit 7ec2780

Please sign in to comment.