Skip to content

Commit

Permalink
Merge branch 'master' into active_message_stability_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pattyjogal authored Oct 1, 2021
2 parents d39b59a + a9eab41 commit 08d178d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/commands/tenmans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ class VoteQueueButtonAction extends VoteQueueAction<ButtonInteraction> {
if (tenmansQueue.length >= botConfig.minVoteCount) {
// Generate proper interactable queue once min votes reached
try {
await activeVoteMessage.delete();

await activeVoteMessage?.delete();
voteClosingTime = null;
activeVoteMessage = null;

Expand Down Expand Up @@ -307,6 +306,7 @@ class TenmansCloseSubcommand extends MessageExecutable<CommandInteraction> {
tenmansQueue = [];
try {
await activeTenmansMessage?.delete();
activeTenmansMessage = null;
} catch (e) {
console.error(e);
}
Expand Down Expand Up @@ -510,7 +510,8 @@ export async function handleVoteCleaning() {
// Close vote if it has expired
if (voteClosingTime < new Date()) {
try {
await activeVoteMessage.delete();
await activeVoteMessage?.delete();
activeVoteMessage = null;
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit 08d178d

Please sign in to comment.