Skip to content

Commit

Permalink
Merge pull request #268 from nwplus/convert-to-sapphire
Browse files Browse the repository at this point in the history
hotfix
  • Loading branch information
mwang2000 authored Feb 27, 2023
2 parents 2a52ff8 + aad7658 commit a2d1ae8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion commands/a_activity/discord-contests.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class DiscordContests extends Command {
collector.on('collect', async i => {
const winnerRequest = await i.reply({ content: '<@' + i.user.id + '> Mention the winner in your next message!', fetchReply: true });

const winnerFilter = message => message.user.id === i.user.id;
const winnerFilter = message => message.user.id === i.user.id; // error?
const winnerCollector = adminConsole.createMessageCollector({ filter: winnerFilter, max: 1 });
winnerCollector.on('collect', async m => {
if (m.mentions.members.size > 0) {
Expand Down
34 changes: 15 additions & 19 deletions commands/a_start_commands/start-mentor-cave.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,7 @@ class StartMentorCave extends Command {
value: description
},
{
name: 'Requested by:',
value: '<@' + submitted.user.id + '>'
},
{
name: 'Location',
name: 'Where to meet',
value: location
},
{
Expand All @@ -371,7 +367,7 @@ class StartMentorCave extends Command {
.setStyle('PRIMARY'),
);

const ticketMsg = await incomingTicketChannel.send({ content: '<@&' + role + '>', embeds: [newTicketEmbed], components: [ticketAcceptanceRow] });
const ticketMsg = await incomingTicketChannel.send({ content: '<@&' + role + '>, requested by <@' + submitted.user.id + '>', embeds: [newTicketEmbed], components: [ticketAcceptanceRow] });
submitted.reply({ content: 'Your ticket has been submitted!', ephemeral: true })
const ticketReminder = setTimeout(() => {
ticketMsg.reply('<@&' + role + '> ticket ' + ticketNumber + ' still needs help!');
Expand Down Expand Up @@ -522,12 +518,12 @@ class StartMentorCave extends Command {
.setLabel('Add Mentor Role')
.setStyle('PRIMARY'),
)
.addComponents(
new MessageButton()
.setCustomId('deleteCave')
.setLabel('Delete Cave')
.setStyle('DANGER'),
);
// .addComponents(
// new MessageButton()
// .setCustomId('deleteCave')
// .setLabel('Delete Cave')
// .setStyle('DANGER'),
// );

const adminControls = await adminConsole.send({ embeds: [adminEmbed], components: [adminRow] });
const adminCollector = adminControls.createMessageComponentCollector({ filter: i => !i.user.bot && i.member.roles.cache.has(this.botGuild.roleIDs.adminRole) });
Expand Down Expand Up @@ -585,13 +581,13 @@ class StartMentorCave extends Command {


}
else if (adminInteraction.customId === 'deleteCave') {
mentorCategory.delete();
mentorHelpCategory.delete();
mentorRoleSelectionChannel.delete();
incomingTicketChannel.delete();
requestTicketChannel.delete();
}
// else if (adminInteraction.customId === 'deleteCave') {
// mentorCategory.delete();
// mentorHelpCategory.delete();
// mentorRoleSelectionChannel.delete();
// incomingTicketChannel.delete();
// requestTicketChannel.delete();
// }
})
} catch (error) {
// winston.loggers.get(interaction.guild.id).warning(`An error was found but it was handled by not setting up the mentor cave. Error: ${error}`, { event: 'StartMentorCave Command' });
Expand Down

0 comments on commit a2d1ae8

Please sign in to comment.