mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Add "Twitter for Xiao" to tweet
This commit is contained in:
@@ -76,7 +76,12 @@ module.exports = class TweetCommand extends Command {
|
|||||||
ctx.fillText(lines.join('\n'), 32, 164);
|
ctx.fillText(lines.join('\n'), 32, 164);
|
||||||
ctx.fillStyle = '#8899a6';
|
ctx.fillStyle = '#8899a6';
|
||||||
ctx.font = '18px Noto';
|
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.font = '16px Noto';
|
||||||
ctx.fillText(this.formatNumber(replies), 87, 463);
|
ctx.fillText(this.formatNumber(replies), 87, 463);
|
||||||
ctx.fillText(this.formatNumber(likes), 509, 463);
|
ctx.fillText(this.formatNumber(likes), 509, 463);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "114.29.1",
|
"version": "114.29.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module.exports = class XiaoCommand extends Command {
|
|||||||
super(client, info);
|
super(client, info);
|
||||||
|
|
||||||
this.argsSingleQuotes = info.argsSingleQuotes || false;
|
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.uses = 0;
|
||||||
this.credit = info.credit || [];
|
this.credit = info.credit || [];
|
||||||
this.credit.push({
|
this.credit.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user