mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
Make PNGs Again
This commit is contained in:
@@ -57,7 +57,7 @@ module.exports = class SteamNowPlayingCommand extends Command {
|
||||
if (ctx.measureText(game).width > 160) shorten = true;
|
||||
while (ctx.measureText(game).width > 160) game = game.substr(0, game.length - 1);
|
||||
ctx.fillText(shorten ? `${game}...` : game, 63, 54);
|
||||
return msg.say({ files: [canvas.toBuffer()] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-now-playing.png' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user