mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Display links in all embed URLs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const request = require('node-superfetch');
|
||||
const { shorten, base64 } = require('../../util/Util');
|
||||
const { shorten, base64, embedURL } = require('../../util/Util');
|
||||
const { GITHUB_USERNAME, GITHUB_PASSWORD, XIAO_GITHUB_REPO_USERNAME, XIAO_GITHUB_REPO_NAME } = process.env;
|
||||
|
||||
module.exports = class ChangelogCommand extends Command {
|
||||
@@ -34,7 +34,7 @@ module.exports = class ChangelogCommand extends Command {
|
||||
.setColor(0x7289DA)
|
||||
.setURL(`https://github.com/${XIAO_GITHUB_REPO_USERNAME}/${XIAO_GITHUB_REPO_NAME}/commits/master`)
|
||||
.setDescription(commits.map(commit => {
|
||||
const hash = `[\`${commit.sha.slice(0, 7)}\`](${commit.html_url})`;
|
||||
const hash = embedURL(`\`${commit.sha.slice(0, 7)}\``, commit.html_url);
|
||||
return `${hash} ${shorten(commit.commit.message.split('\n')[0], 50)} - ${commit.author.login}`;
|
||||
}).join('\n'));
|
||||
return msg.embed(embed);
|
||||
|
||||
Reference in New Issue
Block a user