We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b10d88 commit 5deaa4aCopy full SHA for 5deaa4a
src/discordHandler.js
@@ -169,9 +169,10 @@ const commands = {
169
async list(_message, params) {
170
let contacts = utils.whatsapp.contacts();
171
if (params) { contacts = contacts.filter((name) => name.toLowerCase().includes(params.join(' '))); }
172
+ contacts = contacts.sort((a, b) => a.localeCompare(b)).join('\n');
173
const message = utils.discord.partitionText(
174
contacts.length
- ? `${contacts.join('\n')}\n\nNot the whole list? You can refresh your contacts by typing \`resync\``
175
+ ? `${contacts}\n\nNot the whole list? You can refresh your contacts by typing \`resync\``
176
: 'No results were found.',
177
);
178
while (message.length !== 0) {
0 commit comments