Fixed fhi text and added error handling for help dialog

This commit is contained in:
Lily Wonhalf 2021-05-05 10:39:12 -04:00
parent 3ef02c33bd
commit 53fb1a7169
2 changed files with 8 additions and 8 deletions

View file

@ -41,9 +41,9 @@ class FrontHistoryImporting
embed.setColor(APP_MAIN_COLOUR); embed.setColor(APP_MAIN_COLOUR);
embed.setAuthor('Front history importing', bot.user.displayAvatarURL({ dynamic: true })); embed.setAuthor('Front history importing', bot.user.displayAvatarURL({ dynamic: true }));
embed.setDescription( embed.setDescription(
'Importing your front history from PluralKit is planned in the future, but is currently impossible ' + 'Importing your front history to and from PluralKit is planned in the future, but is currently ' +
'until APIv2 for PluralKit is finished. This feature also takes a lower priority than features unique ' + 'impossible to give any front entries to or take entries from PluralKit until APIv2 for PluralKit is ' +
'to Simply Plural.' 'finished. This feature also takes a lower priority than features unique to Simply Plural.'
); );
return message.channel.send(embed); return message.channel.send(embed);

View file

@ -102,7 +102,7 @@ class HelpDialog
this.stopAddingReactions = true; this.stopAddingReactions = true;
if (collection !== undefined && collection.size < 1) { if (collection !== undefined && collection.size < 1) {
await this.postedMessage.reactions.removeAll(); await this.postedMessage.reactions.removeAll().catch(error => Logger.warning(error.message));
return; return;
} }
@ -116,7 +116,7 @@ class HelpDialog
if (this.postedMessage === null) { if (this.postedMessage === null) {
this.postedMessage = await this.originalMessage.channel.send(this.categoriesEmbed).catch(error => Logger.warning(error.toString())); this.postedMessage = await this.originalMessage.channel.send(this.categoriesEmbed).catch(error => Logger.warning(error.toString()));
} else { } else {
await this.postedMessage.reactions.removeAll(); await this.postedMessage.reactions.removeAll().catch(error => Logger.warning(error.message));
await this.postedMessage.edit('', this.categoriesEmbed); await this.postedMessage.edit('', this.categoriesEmbed);
} }
@ -125,7 +125,7 @@ class HelpDialog
this.stopAddingReactions = false; this.stopAddingReactions = false;
for (let i = 0; i < this.usedEmojis.length && !this.stopAddingReactions; i++) { for (let i = 0; i < this.usedEmojis.length && !this.stopAddingReactions; i++) {
await this.postedMessage.react(this.usedEmojis[i]); await this.postedMessage.react(this.usedEmojis[i]).catch(error => Logger.warning(error.message));
} }
} }
@ -134,7 +134,7 @@ class HelpDialog
*/ */
async listCommands(collection) { async listCommands(collection) {
this.stopAddingReactions = true; this.stopAddingReactions = true;
await this.postedMessage.reactions.removeAll(); await this.postedMessage.reactions.removeAll().catch(error => Logger.warning(error.message));
if (collection.size < 1) { if (collection.size < 1) {
this.postedMessage.edit('Timed out! You may send the command again.'); this.postedMessage.edit('Timed out! You may send the command again.');
@ -166,7 +166,7 @@ class HelpDialog
// 5 minutes // 5 minutes
this.postedMessage.awaitReactions(filter, { time: 300000, max: 1 }).then(this.listCategories.bind(this)).catch(Logger.exception); this.postedMessage.awaitReactions(filter, { time: 300000, max: 1 }).then(this.listCategories.bind(this)).catch(Logger.exception);
await this.postedMessage.react('↩️'); await this.postedMessage.react('↩️').catch(error => Logger.warning(error.message));
} }
} }