server/scripts/google.js
/**
 * a function to search video base on the given serach term on MLG channel
 * @param {string} term
 */
a function to search video base on the given serach term on MLG channel
@param {string} term
a function to search video base on the given serach term on MLG channel @param { string } term
async function query (term) {
    try {
        const res = await youtube.search.list({
            channelId: 'UCoh_z6QB0AGB1oxWufvbDUg',
            part: 'snippet',
            q: term,
        });
        return res.data
    } catch (error) {
        return null
    }
}
async function query ( term ) { try { const res = await youtube . search . list ( { channelId : 'UCoh_z6QB0AGB1oxWufvbDUg' , part : 'snippet' , q : term , } ) ; return res . data } catch ( error ) { return null } }
a function to search video base on the given serach term on MLG channel
 @param {string} term
a function to search video base on the given serach term on MLG channel @param { string } term