mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-21 20:37:03 -04:00
add omnisearch for movies&tv
This commit is contained in:
parent
d6b3239e4c
commit
6ddf9829ab
5 changed files with 98 additions and 4 deletions
|
@ -31,6 +31,7 @@ const Api = Object.freeze({
|
|||
|
||||
OMNI_ANIME: '/omni/anime',
|
||||
OMNI_ANIME_SUPPLEMENTAL: '/omni/anime-supplemental',
|
||||
OMNI_MOVIE: '/omni/movie',
|
||||
|
||||
PHOTOFUNIA_RETRO_WAVE: '/photofunia/retro-wave',
|
||||
PHOTOFUNIA_YACHT: '/photofunia/yacht',
|
||||
|
|
|
@ -409,4 +409,11 @@ module.exports.animeSupplemental = async function(context, supplementalKey){
|
|||
return await request(Api.OMNI_ANIME_SUPPLEMENTAL, "GET", {}, {
|
||||
supplemental_key: supplementalKey
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.movie = async function(context, query, includeAdultContent){
|
||||
return await request(Api.OMNI_MOVIE, "GET", {}, {
|
||||
q: query,
|
||||
include_adult: includeAdultContent
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1674,4 +1674,9 @@ module.exports.OMNI_ANIME_FORMAT_TYPES = Object.freeze({
|
|||
MANGA: "Manga",
|
||||
NOVEL: "Novel",
|
||||
ONE_SHOT: "One Shot"
|
||||
})
|
||||
|
||||
module.exports.OMNI_MOVIE_TYPES = Object.freeze({
|
||||
"movie": "Movie",
|
||||
"tv": "TV Show"
|
||||
})
|
|
@ -180,10 +180,10 @@ module.exports.formatPaginationEmbeds = function(embeds){
|
|||
}
|
||||
|
||||
// Creates a page for our paginator. simple helper so we dont have to do {embeds:[]} every time
|
||||
module.exports.page = function(embed){
|
||||
return {
|
||||
module.exports.page = function(embed, message = {}){
|
||||
return Object.assign(message, {
|
||||
embeds: [embed]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.hexToEmbedColor = (color)=>{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue