Skip to content

Commit

Permalink
Merge pull request #280 from nwplus/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
DonaldKLee authored Nov 1, 2024
2 parents ce7daa3 + 6f6bf2c commit 5913c1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ bot.once('ready', async () => {
const startReportCommand = bot.stores.get('commands').get('start-report');
const startReportError = await startReportCommand.tryRestoreReactionListeners(guild);
if (startReportError) {
mainLogger.warning(roleSelectorError);
mainLogger.warning(startReportError);
} else {
mainLogger.verbose('Restored role selector command message');
mainLogger.verbose('Restored start report command message');
}
}

Expand Down
10 changes: 5 additions & 5 deletions commands/hacker_utility/start-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class StartReport extends Command {
interaction.reply({ content: 'Report started!', ephemeral: true });
const msg = await interaction.channel.send({ embeds: [embed], components: [row] });

await this.listenToReports(interaction, msg);
await this.listenToReports(interaction.guild, msg);

const savedMessagesCol = firebaseUtil.getSavedMessagesSubCol(interaction.guild.id);
await savedMessagesCol.doc('report').set({
Expand All @@ -74,10 +74,10 @@ class StartReport extends Command {

/**
*
* @param {Command.ChatInputInteraction} interaction
* @param {Guild} guild
* @param {Message<boolean>} msg
*/
async listenToReports(interaction, msg) {
async listenToReports(guild, msg) {
const checkInCollector = msg.createMessageComponentCollector({ filter: i => !i.user.bot});

checkInCollector.on('collect', async i => {
Expand Down Expand Up @@ -106,9 +106,9 @@ class StartReport extends Command {
const issueMessage = submitted.fields.getTextInputValue('issueMessage');

try {
discordLog(interaction.guild, `<@&${interaction.guild.roleIDs.staffRole}> New anonymous report:\n\n ${issueMessage}`);
discordLog(guild, `<@&${guild.roleIDs.staffRole}> New anonymous report:\n\n ${issueMessage}`);
} catch {
discordLog(interaction.guild, `New anonymous report:\n\n ${issueMessage}`);
discordLog(guild, `New anonymous report:\n\n ${issueMessage}`);
}
submitted.reply({ content: 'Thank you for taking the time to report users who are not following server or MLH rules. You help makes our community safer!', ephemeral: true });
return;
Expand Down

0 comments on commit 5913c1d

Please sign in to comment.