Skip to content

Commit

Permalink
최소멘션갯수 1
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-maki committed Feb 17, 2024
1 parent 0be48e7 commit a3171f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const streaming = createStreamingAPIClient({
for await(const event of streaming.public.subscribe()) {
if(event.event === 'update' && !event.payload.inReplyToId) {
if(event.payload.account.acct.includes('@') && event.payload.account.username === event.payload.account.displayName) {
if(event.payload.mentions.length >= 2 && dayjs(event.payload.account.createdAt).isSame(dayjs(), 'day')) {
if(event.payload.mentions.length >= 1 && dayjs(event.payload.account.createdAt).isSame(dayjs(), 'day')) {
if(/^[a-z0-9]{10}$/.test(event.payload.account.username)) {
console.log(`${event.payload.account.acct} is a bot`);
rest.v1.admin.accounts.$select(event.payload.account.id).action.create({
Expand Down

0 comments on commit a3171f0

Please sign in to comment.