mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-20 20:07:05 -04:00
add news
This commit is contained in:
parent
5b7e9841a4
commit
3a016dde3d
5 changed files with 154 additions and 1 deletions
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -100,6 +100,8 @@ module.exports.ICONS_NEXTGEN = Object.freeze({
|
|||
"open_in_new": "<:nextgen_ico_open_in_new:1336075848528429086>",
|
||||
"open_in_new_alt": "<:nextgen_ico_open_in_new_alt:1336075859181965322>",
|
||||
|
||||
"button_full_coverage": "<:ico_full_coverage:1341535912017793045>",
|
||||
|
||||
/* Brands */
|
||||
"brand": "<:nextgen_ico_brand:1336064940670193780>",
|
||||
"brand_discord": "<:nextgen_ico_brand_discord:1336064953727320256>",
|
||||
|
|
|
@ -96,6 +96,10 @@ const Statics = Object.freeze({
|
|||
file: "brands/maps.png",
|
||||
revision: 0
|
||||
},
|
||||
googlenews: {
|
||||
file: "brands/google_news.png",
|
||||
revision: 0
|
||||
},
|
||||
googletranslate: {
|
||||
file: "brands/googletranslate.png",
|
||||
revision: 0
|
||||
|
@ -233,6 +237,10 @@ const Statics = Object.freeze({
|
|||
search_calculator: {
|
||||
file: "search/calculator.78rasnkwtvo0.png",
|
||||
revision: 1
|
||||
},
|
||||
full_coverage: {
|
||||
file: "search/full_coverage.7aewvft4qrc0.png",
|
||||
revision: 0
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -254,6 +262,7 @@ module.exports.STATICS = Object.freeze({
|
|||
googledictionary: staticAsset(Statics.brands.googledictionary),
|
||||
googlefinance: staticAsset(Statics.brands.googlefinance),
|
||||
googlemaps: staticAsset(Statics.brands.googlemaps),
|
||||
googlenews: staticAsset(Statics.brands.googlenews),
|
||||
googletranslate: staticAsset(Statics.brands.googletranslate),
|
||||
emojipedia: staticAsset(Statics.brands.emojipedia),
|
||||
inferkit: staticAsset(Statics.brands.inferkit),
|
||||
|
@ -291,7 +300,8 @@ module.exports.STATIC_ICONS = Object.freeze({
|
|||
ai_image: staticAsset(Statics.icons.ai_image),
|
||||
ai_image_processing: staticAsset(Statics.icons.ai_image_processing),
|
||||
warning: staticAsset(Statics.icons.warning),
|
||||
search_calculator: staticAsset(Statics.icons.search_calculator)
|
||||
search_calculator: staticAsset(Statics.icons.search_calculator),
|
||||
full_coverage: staticAsset(Statics.icons.full_coverage)
|
||||
})
|
||||
|
||||
module.exports.STATIC_ASSETS = Object.freeze({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue