mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-24 13:57:03 -04:00
reddit command
This commit is contained in:
parent
d0cb4ab67e
commit
c3213c28d8
6 changed files with 113 additions and 2 deletions
|
@ -32,6 +32,7 @@ const Api = Object.freeze({
|
|||
SEARCH_GOOGLE: '/search/google',
|
||||
SEARCH_GOOGLE_IMAGES: '/search/google-images',
|
||||
SEARCH_LYRICS: '/search/lyrics',
|
||||
SEARCH_REDDIT: '/search/reddit',
|
||||
SEARCH_RULE34: '/search/booru',
|
||||
SEARCH_TINEYE: '/search/tineye',
|
||||
SEARCH_URBANDICTIONARY: '/search/urbandictionary',
|
||||
|
|
|
@ -116,6 +116,13 @@ module.exports.googleImages = async function(context, query){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.reddit = async function(context, query, nsfw = false){
|
||||
return await request(Api.SEARCH_REDDIT, "GET", {}, {
|
||||
q: query,
|
||||
nsfw: nsfw
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.rule34 = async function(context, query, site){
|
||||
return await request(Api.SEARCH_RULE34, "GET", {}, {
|
||||
q: query,
|
||||
|
|
|
@ -65,7 +65,11 @@ module.exports.ICONS = Object.freeze({
|
|||
"locale": "<:ico_locale:925891616986791936>",
|
||||
"question": "<:ico_question:949420315677691934>",
|
||||
"upvote": "<:ico_upvote:980238682353205259>",
|
||||
"downvote": "<:ico_downvote:980238681971494963>"
|
||||
"downvote": "<:ico_downvote:980238681971494963>",
|
||||
"reddit_gold": "<:rda_gold:993616956844425266>",
|
||||
"reddit_silver": "<:rda_silver:993616958777983067>",
|
||||
"reddit_wholesome": "<:rda_wholesome:993616961231663165>",
|
||||
"reddit_helpful": "<:rda_helpful:993618441669984437>"
|
||||
})
|
||||
|
||||
module.exports.GUILD_FEATURES = Object.freeze({
|
||||
|
|
|
@ -28,6 +28,10 @@ const Statics = Object.freeze({
|
|||
file: "brands/photofunia.png",
|
||||
revision: 1
|
||||
},
|
||||
reddit: {
|
||||
file: "brands/reddit.png",
|
||||
revision: 0
|
||||
},
|
||||
tineye: {
|
||||
file: "brands/tineye.png",
|
||||
revision: 1
|
||||
|
@ -55,7 +59,7 @@ const Statics = Object.freeze({
|
|||
revision: 0
|
||||
},
|
||||
error: {
|
||||
file: "icons/ico_warning_small.png",
|
||||
file: "icons/ico_error_small.png",
|
||||
revision: 0
|
||||
},
|
||||
loading: {
|
||||
|
@ -80,6 +84,7 @@ module.exports.STATICS = Object.freeze({
|
|||
inferkit: staticAsset(Statics.brands.inferkit),
|
||||
makesweet: staticAsset(Statics.brands.makesweet),
|
||||
photofunia: staticAsset(Statics.brands.photofunia),
|
||||
reddit: staticAsset(Statics.brands.reddit),
|
||||
tineye: staticAsset(Statics.brands.tineye),
|
||||
urbandictionary: staticAsset(Statics.brands.urbandictionary),
|
||||
wikihow: staticAsset(Statics.brands.wikihow),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue