This commit is contained in:
bignutty 2025-02-18 23:25:10 +01:00
parent 5b7e9841a4
commit 3a016dde3d
5 changed files with 154 additions and 1 deletions

View file

@ -40,6 +40,8 @@ const Api = Object.freeze({
SEARCH_BING_IMAGES: '/search/bing-images',
SEARCH_GOOGLE: '/search/google',
SEARCH_GOOGLE_IMAGES: '/search/google-images',
SEARCH_GOOGLE_NEWS: '/search/google-news',
SEARCH_GOOGLE_NEWS_SUPPLEMENTAL: '/search/google-news-supplemental',
SEARCH_LYRICS: '/search/lyrics',
SEARCH_MAPS: '/search/maps',
SEARCH_MAPS_SUPPLEMENTAL: '/search/maps-supplemental',

View file

@ -126,6 +126,18 @@ module.exports.googleImages = async function(context, query, nsfw){
})
}
module.exports.googleNews = async function(context, query, nsfw){
return await request(Api.SEARCH_GOOGLE_NEWS, "GET", {}, {
q: query
})
}
module.exports.googleNewsSupplemental = async function(context, supplementalKey){
return await request(Api.SEARCH_GOOGLE_NEWS_SUPPLEMENTAL, "GET", {}, {
supplemental_key: supplementalKey
})
}
module.exports.lyrics = async function(context, query){
return await request(Api.SEARCH_LYRICS, "GET", {}, {
q: query