rm: icon logger

This commit is contained in:
Saahil 2025-01-30 16:16:34 -05:00
parent 09ca1ea315
commit 76ae62397a
No known key found for this signature in database
GPG key ID: 8A8B64515254CFC6

View file

@ -1,41 +0,0 @@
import util from "util";
import { Command, onlyForMe } from "../modules/BaseCommand";
import { ModifiedApp } from "../modules/slackapp";
export default class IconLogger implements Command {
name: string;
description: string;
is_event?: boolean;
constructor() {
this.name = "team_profile_change";
this.description = `new icon??`;
this.is_event = true;
}
run(app: ModifiedApp) {
// app.command()
setInterval(async () => {
const teamInfo = await app.client.team.info();
console.debug(teamInfo);
if (teamInfo.team.icon.image_34 !== app.db.get("team_icon")) {
await app.client.chat.postMessage({
channel: `C08AUQ4AZL5`,
text: `:tada: New icon!\n> ${teamInfo.team.icon.image_132}`,
});
app.db.set("team_icon", teamInfo.team.icon.image_34);
}
}, 60 * 1000);
// app.event(this.name, async ({ event }) => {
// console.debug(event);
// // try {
// //@ts-ignore
// const { profile } = event;
// if (profile && profile.icon) {
// await app.client.chat.postMessage({
// channel: `C08AUQ4AZL5`,
// text: `:tada: New icon! ${profile.icon}`,
// });
// }
// });
}
}