mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 00:06:42 +02:00
Show your server's channels in phone-book
This commit is contained in:
@@ -26,12 +26,11 @@ module.exports = class PhoneBookCommand extends Command {
|
||||
&& channel.topic
|
||||
&& channel.topic.includes('<xiao:phone>')
|
||||
&& !channel.topic.includes('<xiao:phone-book:hide>')
|
||||
&& !msg.guild.channels.cache.has(channel.id)
|
||||
&& (channel.guild.name.toLowerCase().includes(search) || channel.name.includes(search));
|
||||
});
|
||||
if (!channels.size) return msg.reply('Could not find any results.');
|
||||
return msg.say(stripIndents`
|
||||
_**Results:**__ _(${channels.size} Results)_
|
||||
__**Results:**__ _(${channels.size} Results)_
|
||||
${channels.map(c => `**${c.id}** (#${c.name}: ${c.guild.name})`).slice(0, 10).join('\n')}
|
||||
`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user