fix(racha): mejorar la construcción del display en el comando de racha
This commit is contained in:
17
.vscode/tasks.json
vendored
Normal file
17
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "Typecheck: tsc --noEmit",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "npm",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"-s",
|
||||||
|
"tsc",
|
||||||
|
"--",
|
||||||
|
"--noEmit"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -3,7 +3,11 @@ import type Amayo from "../../../core/client";
|
|||||||
import { getStreakInfo, updateStreak } from "../../../game/streaks/service";
|
import { getStreakInfo, updateStreak } from "../../../game/streaks/service";
|
||||||
import type { TextBasedChannel } from "discord.js";
|
import type { TextBasedChannel } from "discord.js";
|
||||||
import { fetchItemBasics, formatItemLabel, sendDisplayReply } from "./_helpers";
|
import { fetchItemBasics, formatItemLabel, sendDisplayReply } from "./_helpers";
|
||||||
import { buildDisplay, textBlock, dividerBlock } from "../../../core/lib/componentsV2";
|
import {
|
||||||
|
buildDisplay,
|
||||||
|
textBlock,
|
||||||
|
dividerBlock,
|
||||||
|
} from "../../../core/lib/componentsV2";
|
||||||
|
|
||||||
export const command: CommandMessage = {
|
export const command: CommandMessage = {
|
||||||
name: "racha",
|
name: "racha",
|
||||||
@@ -98,10 +102,7 @@ export const command: CommandMessage = {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const display = buildDisplay(
|
const display = buildDisplay(daysIncreased ? 0x00ff00 : 0xffa500, blocks);
|
||||||
daysIncreased ? 0x00ff00 : 0xffa500,
|
|
||||||
blocks
|
|
||||||
);
|
|
||||||
|
|
||||||
await sendDisplayReply(message, display);
|
await sendDisplayReply(message, display);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user