mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 23:23:08 -04:00
[cmd] r34
This commit is contained in:
parent
35b16e22b1
commit
e97066e112
5 changed files with 98 additions and 1 deletions
|
@ -30,6 +30,7 @@ const Api = Object.freeze({
|
|||
SEARCH_GOOGLE: '/search/google',
|
||||
SEARCH_GOOGLE_IMAGES: '/search/google-images',
|
||||
SEARCH_LYRICS: '/search/lyrics',
|
||||
SEARCH_RULE34: '/search/booru',
|
||||
SEARCH_WOLFRAM_ALPHA: '/search/wolfram-alpha',
|
||||
SEARCH_YOUTUBE: '/search/youtube',
|
||||
|
||||
|
|
|
@ -115,6 +115,13 @@ module.exports.googleImages = async function(context, query){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.rule34 = async function(context, query, site){
|
||||
return await request(Api.SEARCH_RULE34, "GET", {}, {
|
||||
q: query,
|
||||
site: site
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.bing = async function(context, query){
|
||||
return await request(Api.SEARCH_BING, "GET", {}, {
|
||||
q: query
|
||||
|
|
|
@ -3,7 +3,8 @@ module.exports.COLORS = Object.freeze({
|
|||
"success": 6411359,
|
||||
"warning": 16426522,
|
||||
"embed": 3092790,
|
||||
"brand": 6085465
|
||||
"brand": 6085465,
|
||||
"nsfw": 15549056
|
||||
})
|
||||
|
||||
module.exports.ICONS = Object.freeze({
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
const { COLORS } = require('../constants')
|
||||
const { link } = require('./markdown')
|
||||
|
||||
// TODO: make embed icons use the general STATICS system
|
||||
const embedTypes = Object.freeze({
|
||||
"default": (context) => {
|
||||
return {
|
||||
|
@ -27,6 +29,16 @@ const embedTypes = Object.freeze({
|
|||
},
|
||||
color: COLORS.error
|
||||
}
|
||||
},
|
||||
"nsfw": (context) => {
|
||||
return {
|
||||
author: {
|
||||
iconUrl: `https://derpystuff.gitlab.io/webstorage4/v2/assets/icons/ico_nsfw_small.png`,
|
||||
name: `This command is only available in Age Restricted channels.`,
|
||||
url: `https://support.discord.com/hc/en-us/articles/115000084051-Age-Restricted-Channels-and-Content`
|
||||
},
|
||||
color: COLORS.nsfw
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue