File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ require('dotenv').config();
1616const WebClient = slackWebApi . WebClient ;
1717
1818const DEFAULT_OUTPUT_DIR = path . join ( __dirname , '../mocks/slack-api/data' ) ;
19- const DEFAULT_CHANNEL_LIMIT = 10 ;
19+ const DEFAULT_CHANNEL_LIMIT = 5 ;
2020const DEFAULT_MESSAGE_LIMIT = 20 ;
2121const DEFAULT_USER_LIMIT = 20 ;
2222
@@ -202,8 +202,9 @@ async function fetchChannels() {
202202 try {
203203 log . info ( 'Fetching channel list...' ) ;
204204 const result = await slack . conversations . list ( {
205- limit : channelLimit ,
206- types : 'public_channel,private_channel'
205+ limit : 100 ,
206+ types : 'public_channel,private_channel' ,
207+ exclude_archived : true
207208 } ) ;
208209 saveToFile ( result , 'conversations.json' ) ;
209210 return result . channels ;
@@ -274,7 +275,6 @@ async function main() {
274275 const activeChannels = channels . filter ( channel => ! channel . is_archived ) ;
275276 log . info ( `Found ${ activeChannels . length } active channels out of ${ channels . length } total` ) ;
276277
277- const channelLimit = 5 ;
278278 const targetChannels = activeChannels . slice ( 0 , channelLimit ) ;
279279 log . info ( `Selected ${ targetChannels . length } active channels for message fetching` ) ;
280280
You can’t perform that action at this time.
0 commit comments