diff --git a/src/plugins/pole.ts b/src/plugins/pole.ts
index 05fb0f9..15dc36d 100644
--- a/src/plugins/pole.ts
+++ b/src/plugins/pole.ts
@@ -165,28 +165,26 @@ export class PolePlugin extends PluginBase {
});
text = `${this.strings.ranking}:`;
const rank = this.sortRanking(ranking, 'points');
- rank.map(async (user) => {
- text += `\n • ${await getFullName(this.bot, user.uid, false)}: ${user.points} ${this.strings.points}`;
- });
+ for (const user of rank) {
+ const name = await getFullName(this.bot, user.uid, false);
+ text += `\n - ${name}: ${user.points} ${this.strings.points}`;
+ }
- await Promise.all(
- types.map(async (type) => {
- let section = `\n\n${capitalize(this.strings[type + 's'])}:`;
- let empty = true;
- const rank = this.sortRanking(ranking, type);
- await Promise.all(
- rank.map(async (user) => {
- if (user[type]) {
- empty = false;
- section += `\n • ${await getFullName(this.bot, user.uid, false)}: ${user[type]} ${this.strings[type + 's']}`;
- }
- }),
- );
- if (!empty) {
- text += section;
+ for (const type of types) {
+ let section = `\n\n${capitalize(this.strings[type + 's'])}:`;
+ let empty = true;
+ const rank = this.sortRanking(ranking, type);
+ for (const user of rank) {
+ if (user[type]) {
+ empty = false;
+ const name = await getFullName(this.bot, user.uid, false);
+ section += `\n - ${name}: ${user[type]} ${this.strings[type + 's']}`;
}
- }),
- );
+ }
+ if (!empty) {
+ text += section;
+ }
+ }
} else {
this.bot.replyMessage(msg, this.bot.errors.noResults);
}