Skip to content

Commit

Permalink
Add send telegram workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshin committed Feb 7, 2022
1 parent c4f2602 commit 1b6c2b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/telegram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
run: node index.js

env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT: ${{ secrets.TELEGRAM_CHAT }}
SIMPREAD_TOKEN: ${{ secrets.SIMPREAD_TOKEN }}
SIMPREAD_ID: ${{ secrets.SIMPREAD_ID }}
TELEGRAM_CHAT: ${{ secrets.TELEGRAM_CHAT }}
10 changes: 0 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ function sendTelegram( urls ) {
{{urls}}
来自 [简悦](http://simpread.pro/)`,
/*
sendMessage = `https://api.telegram.org/bot${ process.env.TELEGRAM_TOKEN }/sendMessage?chat_id=${ process.env.TELEGRAM_CHAT }&parse_mode=Markdown&text=` + encodeURIComponent( text.replace( '{{urls}}', urls.join( '\n' )) );
axios.get( sendMessage )
.then( response => {
res.json({ status: 201, response });
})
.catch( error => {
res.json({ status: 201, error });
})
*/
config = {
url : 'https://simpread-api-kenshin.vercel.app/api/service/telegram',
method : 'post',
Expand Down

0 comments on commit 1b6c2b0

Please sign in to comment.