mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 14:43:05 -04:00
wikipedia slash
This commit is contained in:
parent
0c6e0e2fba
commit
63ce6d377f
2 changed files with 90 additions and 2 deletions
|
@ -17,7 +17,8 @@ module.exports = {
|
|||
description_short: 'Search on Wikipedia',
|
||||
examples: ['wiki otters'],
|
||||
category: 'search',
|
||||
usage: 'wikipedia <query>'
|
||||
usage: 'wikipedia <query>',
|
||||
slashCommand: "wikipedia"
|
||||
},
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline],
|
||||
run: async (context, args) => {
|
||||
|
@ -51,7 +52,7 @@ module.exports = {
|
|||
url: 'https:' + res.thumbnail.url.replace(/d3\/.*?\/[0-9]*px-/, '/d3/').replace('/thumb/d/', '/d')
|
||||
}
|
||||
|
||||
if(res.excerpt) p.description = res.excerpt.replace(/\<.*?\>/g, '')
|
||||
if(res.excerpt) p.description = res.excerpt.replace(/<.*?>/g, '')
|
||||
|
||||
pages.push(page(p))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue