mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Lyrics and Thumbnail in VOCALOID
This commit is contained in:
@@ -31,7 +31,8 @@ module.exports = class VocaloidCommand extends Command {
|
|||||||
getTotalCount: true,
|
getTotalCount: true,
|
||||||
sort: 'FavoritedTimes',
|
sort: 'FavoritedTimes',
|
||||||
preferAccurateMatches: true,
|
preferAccurateMatches: true,
|
||||||
nameMatchMode: 'Exact'
|
nameMatchMode: 'Words',
|
||||||
|
fields: 'ThumbUrl,Lyrics'
|
||||||
});
|
});
|
||||||
if (!body.totalCount) return msg.say('No Results.');
|
if (!body.totalCount) return msg.say('No Results.');
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
@@ -39,6 +40,8 @@ module.exports = class VocaloidCommand extends Command {
|
|||||||
.setAuthor('VocaDB', 'https://i.imgur.com/9Tx9UIc.jpg')
|
.setAuthor('VocaDB', 'https://i.imgur.com/9Tx9UIc.jpg')
|
||||||
.setTitle(body.items[0].name)
|
.setTitle(body.items[0].name)
|
||||||
.setURL(`http://vocadb.net/S/${body.items[0].id}`)
|
.setURL(`http://vocadb.net/S/${body.items[0].id}`)
|
||||||
|
.setDescription(body.items[0].lyrics[0] ? body.items[0].lyrics[0].value : 'Unable to find lyrics.')
|
||||||
|
.setThumbnail(body.items[0].thumbUrl)
|
||||||
.addField('❯ Artist',
|
.addField('❯ Artist',
|
||||||
body.items[0].artistString)
|
body.items[0].artistString)
|
||||||
.addField('❯ Publish Date',
|
.addField('❯ Publish Date',
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "28.2.1",
|
"version": "28.2.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user