mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-22 04:47:02 -04:00
add duckduckgo
This commit is contained in:
parent
dbab603e7b
commit
8657b8c93b
5 changed files with 293 additions and 0 deletions
|
@ -38,6 +38,7 @@ const Api = Object.freeze({
|
|||
|
||||
SEARCH_BING: '/search/bing',
|
||||
SEARCH_BING_IMAGES: '/search/bing-images',
|
||||
SEARCH_DUCKDUCKGO: '/search/duckduckgo',
|
||||
SEARCH_GOOGLE: '/search/google',
|
||||
SEARCH_GOOGLE_IMAGES: '/search/google-images',
|
||||
SEARCH_GOOGLE_NEWS: '/search/google-news',
|
||||
|
|
|
@ -196,6 +196,13 @@ module.exports.bingImages = async function(context, query, nsfw){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.duckduckgo = async function(context, query, nsfw){
|
||||
return await request(Api.SEARCH_DUCKDUCKGO, "GET", {}, {
|
||||
q: query,
|
||||
nsfw: nsfw
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.reverseImageSearch = async function(context, url){
|
||||
return await request(Api.SEARCH_REVERSE_IMAGE, "GET", {}, {
|
||||
url: url
|
||||
|
|
|
@ -64,6 +64,10 @@ const Statics = Object.freeze({
|
|||
file: "brands/chatgpt.png",
|
||||
revision: 1
|
||||
},
|
||||
duckduckgo: {
|
||||
file: "brands/duckduckgo.png",
|
||||
revision: 0
|
||||
},
|
||||
emojipedia: {
|
||||
file: "brands/emojipedia.png",
|
||||
revision: 3
|
||||
|
@ -255,6 +259,7 @@ module.exports.STATICS = Object.freeze({
|
|||
bard: staticAsset(Statics.brands.bard),
|
||||
bing: staticAsset(Statics.brands.bing),
|
||||
chatgpt: staticAsset(Statics.brands.chatgpt),
|
||||
duckduckgo: staticAsset(Statics.brands.duckduckgo),
|
||||
genius: staticAsset(Statics.brands.genius),
|
||||
google: staticAsset(Statics.brands.google),
|
||||
googlelens: staticAsset(Statics.brands.googlelens),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue