pub fn create_autojoin_buffers(_ready: &Ready) {
    let ctx = match crate::discord::get_ctx() {
        Some(ctx) => ctx,
        _ => return,
    };

    let current_user = ctx.cache.read().user.clone();

    let autojoined_items = on_main_blocking(move |weechat| {
        weechat
            .get_plugin_option("autojoin_channels")
            .map(|ch| ch.to_string())
    });

    let autojoin_items: String = match autojoined_items {
        Some(items) => items,
        None => return,
    };

    let autojoin_items = autojoin_items
        .split(',')
        .filter(|i| !i.is_empty())
        .filter_map(utils::parse_id);

    // flatten guilds into channels
    let channels = utils::flatten_guilds(&ctx, &autojoin_items.collect::<Vec<_>>());

    create_buffers_from_flat_items(&ctx, &current_user, &channels);
}
// TODO: Merge these functions
// Flesh this out
Merge these functions
Flesh this out
Merge these functions Flesh this out
pub fn create_autojoin_buffers(_ready: &Ready) {
    let ctx = match crate::discord::get_ctx() {
        Some(ctx) => ctx,
        _ => return,
    };
    let current_user = ctx.cache.read().user.clone();
    let autojoined_items = on_main_blocking(move |weechat| {
        weechat
            .get_plugin_option("autojoin_channels")
            .map(|ch| ch.to_string())
    });
    let autojoin_items: String = match autojoined_items {
        Some(items) => items,
        None => return,
    };
    let autojoin_items = autojoin_items
        .split(',')
        .filter(|i| !i.is_empty())
        .filter_map(utils::parse_id);
    // flatten guilds into channels
    let channels = utils::flatten_guilds(&ctx, &autojoin_items.collect::<Vec<_>>());
    create_buffers_from_flat_items(&ctx, &current_user, &channels);
}
pub fn create_autojoin_buffers ( _ready : & Ready ) { let ctx = match crate :: discord :: get_ctx ( ) { Some ( ctx ) => ctx , _ => return , } ; let current_user = ctx . cache . read ( ) . user . clone ( ) ; let autojoined_items = on_main_blocking ( move | weechat | { weechat . get_plugin_option ( " " ) . map ( | ch | ch . to_string ( ) ) } ) ; let autojoin_items : String = match autojoined_items { Some ( items ) => items , None => return , } ; let autojoin_items = autojoin_items . split ( ',' ) . filter ( | i | ! i . is_empty ( ) ) . filter_map ( utils :: parse_id ) ; // flatten guilds into channels let channels = utils :: flatten_guilds ( & ctx , & autojoin_items . collect :: < Vec < _ > > ( ) ) ; create_buffers_from_flat_items ( & ctx , & current_user , & channels ) ; }
TODO: Merge these functions
Flesh this out
TODO : Merge these functions Flesh this out
_ready
&Ready
_ready
&Ready