mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 23:22:56 +00:00
enhancement(lint): Fix lint errors for src/commands/home.ts
Co-authored-by: NeonGamerBot-QK <saahilattud@gmail.com> Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
This commit is contained in:
parent
fdc0c1aebb
commit
9443bb761d
1 changed files with 32 additions and 33 deletions
|
|
@ -84,43 +84,42 @@ export default class AppHome implements Command {
|
|||
value: "send_mail",
|
||||
action_id: "send_mail",
|
||||
},
|
||||
|
||||
},
|
||||
...app.dbs.anondm
|
||||
//@ts-ignore
|
||||
.get(usersInDb.find((e) => bcrypt.compareSync(event.user, e)))
|
||||
.messages.filter((e) => {
|
||||
try {
|
||||
EncryptedJsonDb.decrypt(
|
||||
e,
|
||||
//@ts-ignore
|
||||
`${event.user}_` + process.env.ANONDM_PASSWORD,
|
||||
);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.map((e) => {
|
||||
// map to a slack element block
|
||||
return {
|
||||
type: "section",
|
||||
//@ts-ignore
|
||||
.get(usersInDb.find((e) => bcrypt.compareSync(event.user, e)))
|
||||
.messages.filter((e) => {
|
||||
try {
|
||||
EncryptedJsonDb.decrypt(
|
||||
e,
|
||||
//@ts-ignore
|
||||
`${event.user}_` + process.env.ANONDM_PASSWORD,
|
||||
);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.map((e) => {
|
||||
// map to a slack element block
|
||||
return {
|
||||
type: "section",
|
||||
text: {
|
||||
type: "mrkdwn",
|
||||
text: `> :email_unread: New Message`,
|
||||
},
|
||||
accessory: {
|
||||
type: "button",
|
||||
text: {
|
||||
type: "mrkdwn",
|
||||
text: `> :email_unread: New Message`,
|
||||
type: "plain_text",
|
||||
text: "Open",
|
||||
emoji: true,
|
||||
},
|
||||
accessory: {
|
||||
type: "button",
|
||||
text: {
|
||||
type: "plain_text",
|
||||
text: "Open",
|
||||
emoji: true,
|
||||
},
|
||||
value: "open_mail_v",
|
||||
action_id: "open_mail_actionid",
|
||||
}
|
||||
};
|
||||
}),
|
||||
value: "open_mail_v",
|
||||
action_id: "open_mail_actionid",
|
||||
},
|
||||
};
|
||||
}),
|
||||
];
|
||||
//@ts-ignore
|
||||
if (process.env.MY_USER_ID !== event.user)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue