mirror of
https://github.com/bradganley/bsky-user-activity-bot.git
synced 2025-12-12 20:25:25 +00:00
Added variables to disable/enable event types. Updated examples
Some checks failed
Create and publish the bot container / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish the bot container / build-and-push-image (push) Has been cancelled
This commit is contained in:
16
src/index.ts
16
src/index.ts
@@ -25,7 +25,7 @@ let jetstreamSubscription: JetstreamSubscription;
|
||||
|
||||
let handlers = {
|
||||
post: {
|
||||
c: [
|
||||
c: (Bun.env.POST_EVENT !== "false" ? [
|
||||
new MessageHandler(
|
||||
// @ts-ignore
|
||||
[ActionTakenByUserValidator.make(<string>Bun.env.USER_DID)],
|
||||
@@ -52,9 +52,11 @@ let handlers = {
|
||||
testAgent
|
||||
)
|
||||
]
|
||||
: []
|
||||
)
|
||||
},
|
||||
like: {
|
||||
c: [
|
||||
c: (Bun.env.LIKE_EVENT !== "false" ? [
|
||||
new MessageHandler(
|
||||
// @ts-ignore
|
||||
[ActionTakenByUserValidator.make(<string>Bun.env.USER_DID)],
|
||||
@@ -67,9 +69,11 @@ let handlers = {
|
||||
testAgent
|
||||
)
|
||||
]
|
||||
: []
|
||||
)
|
||||
},
|
||||
repost: {
|
||||
c: [
|
||||
c: (Bun.env.REPOST_EVENT !== "false" ? [
|
||||
new MessageHandler(
|
||||
// @ts-ignore
|
||||
[ActionTakenByUserValidator.make(<string>Bun.env.USER_DID)],
|
||||
@@ -82,9 +86,11 @@ let handlers = {
|
||||
testAgent
|
||||
)
|
||||
]
|
||||
: []
|
||||
)
|
||||
},
|
||||
block: {
|
||||
c: [
|
||||
c: (Bun.env.BLOCK_EVENT !== "false" ? [
|
||||
new MessageHandler(
|
||||
// @ts-ignore
|
||||
[
|
||||
@@ -100,6 +106,8 @@ let handlers = {
|
||||
testAgent
|
||||
)
|
||||
]
|
||||
: []
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user