diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..8b6fcf7 --- /dev/null +++ b/.env.example @@ -0,0 +1,31 @@ +## Some of this may not be able to be filled out. +SLACK_USER_TOKEN= +SLACK_BOT_TOKEN= +APP_ID= +CLIENT_ID= +CLIENT_SECRET= +SLACK_SIGNING_SECRET= +VERIFY_TOKEN= +APP_LEVEL_TOKEN= +WEBHOOK_URL= +PORT= +MY_USER_ID=U07L45W79E1 +AUTH= +MY_JELLYFIN_INSTANCE= +MY_JELLYFIN_TOKEN= +ZEON_DISCORD_INSTANCE= +MY_SLACK_TOKEN= +IRL_AUTH= +MY_NEXTDNS= +HACKCLUB_NEXTDNS= +NEXTDNS_API_KEY= +HW_URL=https://..../iCal.aspx +ENC_HACKTIME_TOKEN= +OPENAI_API_KEY=sk-proj- +# ctf +SECOND_FLAG= +SONAR_KEY= +CTF_PASSWORD= +FINAL_KEY= +ENC_KEY= +ENC_IV= diff --git a/src/commands/home.ts b/src/commands/home.ts index 486ac04..74fbc5e 100644 --- a/src/commands/home.ts +++ b/src/commands/home.ts @@ -2,6 +2,8 @@ import { App, View } from "@slack/bolt"; import { Command, onlyForMe } from "../modules/BaseCommand"; +import { ModifiedApp } from "../modules/slackapp"; +import { getSpotifyStatus } from "../modules/status"; function formatUptime(uptime: number = process.uptime()) { const seconds = Math.floor(uptime % 60); const minutes = Math.floor((uptime / 60) % 60); @@ -19,10 +21,12 @@ export default class AppHome implements Command { this.description = `app home`; this.is_event = true; } - run(app: App) { + run(app: ModifiedApp) { // app.command() app.event(this.name, async ({ event, client, logger }) => { try { + const spotifyStr = await getSpotifyStatus(); + const ctfData = app.db.get("ctf") || [] //@ts-ignore console.log(`USER: ${event.user}`); function genView(): View { @@ -47,6 +51,14 @@ export default class AppHome implements Command { text: "Nothing on the home page for you :P.", }, }, + // ctf channels (the user can see it) + ctfData.length > 0 && { +type: "section", +text: { + type: "mrkdwn", + text: `*Ctf channels:*\n${ctfData.map(e => `<#${e.channel}>`).join("\n")}`, +} + } ], }; return { @@ -88,6 +100,14 @@ export default class AppHome implements Command { ), }, }, + // ctf channels (the user can see it) + ctfData.length > 0 && { + type: "section", + text: { + type: "mrkdwn", + text: `*Ctf channels:*\n${ctfData.map(e => `<#${e.channel}>`).join("\n")}`, + } + }, { type: "divider", }, @@ -134,6 +154,13 @@ export default class AppHome implements Command { }, ], }, + spotifyStr && { + type: "section", + text: { + type: "mrkdwn", + text: `*Spotify:*\n${spotifyStr}`, + }, + }, { type: "divider", }, diff --git a/src/modules/randomResponseSystem.ts b/src/modules/randomResponseSystem.ts index 268d433..e5b9e8c 100644 --- a/src/modules/randomResponseSystem.ts +++ b/src/modules/randomResponseSystem.ts @@ -4,7 +4,7 @@ export const acRandom = () => [ "It might be {hour} but i COULD be tweaking", "hello today, my name is ~markiplier~ zeon.", "Wana break from the ads, tap now because YOU can get spotify premium", - "Counterspell about to be lit (yes)", + //"Counterspell about to be lit (yes)", "Um uh im a robot.", "do NOT star this message", "Start this message", @@ -19,6 +19,7 @@ export const beggingMessage = [ "PLEASE JOIN IT RAA", "Its epik i swear", "warning: may contain extremly dead chat.", + "PLEASE PLEASE PLZ PLZPLZ" ]; // if you want to become a neighboor of this channel just dm me on slack or add your self to the canvas export const neighbors = [