Skip to content

自动确认 #2914

Jun 14, 2023 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

You don't need a plugin, with ASF's IPC interface you can easily write yourself e.g. a bash script like the one I coded for myself:

#!/usr/bin/env sh
set -eu

ASF_BOT="your_bot_name"
IPC_HOST="127.0.0.1:1242"
IPC_PASSWORD="your_ipc_password"

while :; do
        clear
        curl -X 'POST' "http://${IPC_HOST}/Api/Bot/${ASF_BOT}/TwoFactorAuthentication/Confirmations" -H 'accept: application/json' -H "Authentication: ${IPC_PASSWORD}" -H 'Content-Type: application/json' -d '{ "Accept": true }' -s
        sleep 10
done

This one will run in foreground and accept all confirmations every 10 seconds. You can easily change this e.g. into a cron job, or do whatever else you need, since in order to…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@1633232731
Comment options

Comment options

You must be logged in to vote
3 replies
@1633232731
Comment options

@1633232731
Comment options

@846631868
Comment options

Answer selected by 1633232731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants