Skip to content

Commit

Permalink
Revert "use new bot server"
Browse files Browse the repository at this point in the history
This reverts commit 74fccb2.
  • Loading branch information
pompurin404 committed Oct 14, 2024
1 parent 74fccb2 commit 1a992b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,6 @@ jobs:
if: startsWith(github.ref, 'refs/heads/')
needs: [windows, macos, linux, windows7]
runs-on: ubuntu-latest
services:
telegram-bot-api:
image: aiogram/telegram-bot-api:latest
env:
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_BOT_API_ID }}
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_BOT_API_HASH }}
ports:
- 8081:8081
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -243,6 +235,11 @@ jobs:
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Telegram Bot Server
uses: zjns/telegram-bot-server@v1
with:
api_id: ${{ secrets.TELEGRAM_BOT_API_ID }}
api_hash: ${{ secrets.TELEGRAM_BOT_API_HASH }}
- name: Upload Artifacts
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions scripts/artifact.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,31 @@ macosFiles.forEach((file, index) => {
})

await axios.post(
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
`http://127.0.0.1:8088/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
windowsForm,
{
headers: windowsForm.getHeaders()
}
)

await axios.post(
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
`http://127.0.0.1:8088/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
windows7Form,
{
headers: windows7Form.getHeaders()
}
)

await axios.post(
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
`http://127.0.0.1:8088/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
macosForm,
{
headers: macosForm.getHeaders()
}
)

await axios.post(
`http://127.0.0.1:8081/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
`http://127.0.0.1:8088/bot${process.env.TELEGRAM_BOT_TOKEN}/sendMediaGroup`,
linuxForm,
{
headers: linuxForm.getHeaders()
Expand Down
2 changes: 1 addition & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (!gotTheLock) {
app.quit()
}

function customRelaunch(): void {
export function customRelaunch(): void {
const script = `while kill -0 ${process.pid} 2>/dev/null; do
sleep 0.1
done
Expand Down

0 comments on commit 1a992b8

Please sign in to comment.