Add "Twitter for Xiao" to tweet

This commit is contained in:
Dragon Fire
2020-05-24 23:58:19 -04:00
parent 6cb1783e21
commit 5597a5c5a2
3 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -76,7 +76,12 @@ module.exports = class TweetCommand extends Command {
ctx.fillText(lines.join('\n'), 32, 164);
ctx.fillStyle = '#8899a6';
ctx.font = '18px Noto';
ctx.fillText(moment().format('h:mm A ∙ MMMM D, YYYY'), 31, 275);
const time = moment().format('h:mm A ∙ MMMM D, YYYY');
ctx.fillText(time, 31, 275);
const timeLen = ctx.measureText(time).width;
ctx.fillStyle = '#1b95e0';
ctx.fillText('Twitter for Xiao', 31 + timeLen + 10, 275);
ctx.fillStyle = '#8899a6';
ctx.font = '16px Noto';
ctx.fillText(this.formatNumber(replies), 87, 463);
ctx.fillText(this.formatNumber(likes), 509, 463);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "114.29.1",
"version": "114.29.2",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
+1 -1
View File
@@ -5,7 +5,7 @@ module.exports = class XiaoCommand extends Command {
super(client, info);
this.argsSingleQuotes = info.argsSingleQuotes || false;
this.throttling = info.throttling || { usages: 1, duration: 2 };
this.throttling = info.unknown ? null : info.throttling || { usages: 1, duration: 2 };
this.uses = 0;
this.credit = info.credit || [];
this.credit.push({