stand impl part 1
This commit is contained in:
40
src/commands/impl/stand.ts
Normal file
40
src/commands/impl/stand.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { ChatMessage } from "@twurple/chat";
|
||||
import { getDeskHeight, startStandingAutomation } from "../../util/api-homeassistant.js";
|
||||
import { logInfo, logSuccess } from "../../util/logger.js";
|
||||
import { BaseCommand } from "../base-command.js";
|
||||
import type { ICommandRequirements } from "../interface.ts";
|
||||
|
||||
export class PositionCommand extends BaseCommand {
|
||||
name = "stand";
|
||||
cooldown = 60;
|
||||
enabled = true;
|
||||
|
||||
requirements: ICommandRequirements = {
|
||||
developer: true,
|
||||
mod: false,
|
||||
};
|
||||
|
||||
triggered = async (
|
||||
channel: string,
|
||||
user: string,
|
||||
_text: string,
|
||||
msg: ChatMessage,
|
||||
) => {
|
||||
logSuccess(`${channel} ${user} position command triggered`);
|
||||
|
||||
// const position = await getDeskHeight();
|
||||
|
||||
// if (position?.state > 100) {
|
||||
|
||||
// }
|
||||
|
||||
const response = await startStandingAutomation();
|
||||
logInfo(response)
|
||||
|
||||
|
||||
|
||||
this.chatClient.say(channel, `blabla`, {
|
||||
replyTo: msg,
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user