mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Garbage
This commit is contained in:
@@ -36,7 +36,7 @@ module.exports = class ShieldsIoBadgeCommand extends Command {
|
|||||||
async run(msg, { subject, status, color }) {
|
async run(msg, { subject, status, color }) {
|
||||||
try {
|
try {
|
||||||
const { body, headers } = await snekfetch.get(`https://img.shields.io/badge/${subject}-${status}-${color}.png`);
|
const { body, headers } = await snekfetch.get(`https://img.shields.io/badge/${subject}-${status}-${color}.png`);
|
||||||
if (headers['Content-Type'] !== 'image/png') return msg.reply('Could not create the badge...');
|
if (headers['content-type'] !== 'image/png') return msg.reply('Could not create the badge...');
|
||||||
return msg.say({ files: [{ attachment: body, name: 'badge.png' }] });
|
return msg.say({ files: [{ attachment: body, name: 'badge.png' }] });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
|
|||||||
Reference in New Issue
Block a user