mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
XKCD Link
This commit is contained in:
@@ -35,6 +35,7 @@ module.exports = class XKCDCommand extends Command {
|
|||||||
if (type === 'today') {
|
if (type === 'today') {
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
.setTitle(`${current.body.num} - ${current.body.title}`)
|
.setTitle(`${current.body.num} - ${current.body.title}`)
|
||||||
|
.setURL(`https://xkcd.com/${current.body.num}`)
|
||||||
.setImage(current.body.img)
|
.setImage(current.body.img)
|
||||||
.setFooter(current.body.alt);
|
.setFooter(current.body.alt);
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
@@ -44,6 +45,7 @@ module.exports = class XKCDCommand extends Command {
|
|||||||
.get(`https://xkcd.com/${random}/info.0.json`);
|
.get(`https://xkcd.com/${random}/info.0.json`);
|
||||||
const embed = new RichEmbed()
|
const embed = new RichEmbed()
|
||||||
.setTitle(`${body.num} - ${body.title}`)
|
.setTitle(`${body.num} - ${body.title}`)
|
||||||
|
.setURL(`https://xkcd.com/${body.num}`)
|
||||||
.setImage(body.img)
|
.setImage(body.img)
|
||||||
.setFooter(body.alt);
|
.setFooter(body.alt);
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "21.1.1",
|
"version": "21.1.2",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "Shard.js",
|
"main": "Shard.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user