mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-22 21:07:02 -04:00
[cmd](search) reverse-image
This commit is contained in:
parent
6526b79c86
commit
e2f69b14c1
4 changed files with 81 additions and 2 deletions
|
@ -32,6 +32,7 @@ const Api = Object.freeze({
|
|||
SEARCH_GOOGLE_IMAGES: '/search/google-images',
|
||||
SEARCH_LYRICS: '/search/lyrics',
|
||||
SEARCH_RULE34: '/search/booru',
|
||||
SEARCH_TINEYE: '/search/tineye',
|
||||
SEARCH_URBANDICTIONARY: '/search/urbandictionary',
|
||||
SEARCH_WIKIHOW: '/search/wikihow',
|
||||
SEARCH_WOLFRAM_ALPHA: '/search/wolfram-alpha',
|
||||
|
|
|
@ -135,6 +135,12 @@ module.exports.bingImages = async function(context, query){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.tineye = async function(context, url){
|
||||
return await request(Api.SEARCH_TINEYE, "GET", {}, {
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.urbandictionary = async function(context, query){
|
||||
return await request(Api.SEARCH_URBANDICTIONARY, "GET", {}, {
|
||||
q: query
|
||||
|
|
|
@ -39,11 +39,15 @@ const Statics = Object.freeze({
|
|||
wikihow: {
|
||||
file: "brands/wikihow.png",
|
||||
revision: 1
|
||||
},
|
||||
tineye: {
|
||||
file: "brands/tineye.png",
|
||||
revision: 1
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function staticAsset(static){
|
||||
function staticAsset(static) {
|
||||
return Hosts.statics + `assets/` + static.file + "?r=" + static.revision
|
||||
}
|
||||
|
||||
|
@ -56,5 +60,6 @@ module.exports.STATICS = Object.freeze({
|
|||
inferkit: staticAsset(Statics.brands.inferkit),
|
||||
youtube: staticAsset(Statics.brands.youtube),
|
||||
urbandictionary: staticAsset(Statics.brands.urbandictionary),
|
||||
wikihow: staticAsset(Statics.brands.wikihow)
|
||||
wikihow: staticAsset(Statics.brands.wikihow),
|
||||
tineye: staticAsset(Statics.brands.tineye)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue