Skip to content

Commit

Permalink
Clubs probably work now
Browse files Browse the repository at this point in the history
  • Loading branch information
tarolling committed Jul 11, 2024
1 parent 17dd188 commit a59cc80
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion commands/rps/club.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ module.exports = {
.addStringOption(option =>
option
.setName('name')
.setDescription('Specify what club you would like to view, or leave blank to view all clubs.')
.setDescription('Specify what club you would like to view.')
.setMinLength(3)
.setMaxLength(32)
.setRequired(true)
)
),
async execute(interaction) {
Expand Down
2 changes: 1 addition & 1 deletion commands/rps/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
},
async execute(interaction) {
const queue = await displayQueue();
if (!queue) return interaction.reply({ content: 'There are no active queues. Type /queue to start one!', ephemeral: true });
if (!queue) return interaction.reply({ content: 'There are no active queues. Type `/queue` to start one!', ephemeral: true });

await interaction.reply({ embeds: [status(queue)] }).catch(console.error);
}
Expand Down
2 changes: 1 addition & 1 deletion src/db/clubs/createClub.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = async (interaction) => {

let validation = await clubCollection.findOne(playerQuery);
if (validation) {
interaction.editReply({ content: `You are already part of this club -> ${validation.name}` });
interaction.editReply({ content: `You are already a member of ${validation.name}!` });
return;
}

Expand Down
3 changes: 1 addition & 2 deletions src/db/clubs/viewClub.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ module.exports = async (interaction) => {
await dbClient.connect();
const collection = dbClient.db('rps').collection('clubs');

let club = await collection.findOne(query);
return club;
return await collection.findOne(query);
} catch (err) {
console.error(err);
} finally {
Expand Down

0 comments on commit a59cc80

Please sign in to comment.