Merge pull request #11 from Xtao-Labs/master

merge
This commit is contained in:
AAA 2020-11-10 22:09:51 +08:00 committed by GitHub
commit 2351940f14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 19 deletions

View File

@ -1,6 +1,9 @@
name: Github commit to telegram
on: [push]
on:
push:
branches:
- master
jobs:
build:
@ -25,4 +28,4 @@ jobs:
# 发送通知
- name: Send notice
run: python telegram_update.py ${{ secrets.TG_BOT_TOKEN }}
run: python telegram_update.py ${{ secrets.TG_BOT_TOKEN }}

View File

@ -62,7 +62,7 @@
},
{
"name": "xtao-some",
"version": "1.01",
"version": "1.10",
"section": "daily",
"maintainer": "xtaodada",
"size": "18.8 kb",
@ -152,7 +152,7 @@
},
{
"name": "portball",
"version": "1.22",
"version": "1.3",
"section": "chat",
"maintainer": "Pentacene",
"size": "3.6 kb",

View File

@ -37,7 +37,7 @@ async def portball(context):
pass
return False
admins = await context.client.get_participants(context.chat, filter=ChannelParticipantsAdmins)
if context.sender in admins:
if (context.sender in admins) or (context.sender_id == 1087968824):
try:
await bot.edit_permissions(context.chat_id, reply.sender.id, timedelta(seconds=int(action[1].replace(' ',''))), send_messages=False, send_media=False, send_stickers=False, send_gifs=False, send_games=False, send_inline=False, send_polls=False, invite_users=False, change_info=False, pin_messages=False)
portball_message = await bot.send_message(

View File

@ -2,8 +2,6 @@ import json, time, sys
from requests import get, post
token = str(sys.argv[1])
time.sleep(30)
main = json.loads(get("https://api.github.com/repos/xtaodada/PagerMaid_Plugins/commits/master").content)
push_content = {}
push_content['chat_id'] = '-1001441461877'

View File

@ -14,9 +14,7 @@ from os import remove
async def guess(context):
reply = await context.get_reply_message()
await context.edit("获取中 . . .")
if reply:
pass
else:
if not reply:
context.edit("宁需要回复一句话")
return True
text = {'text': str(reply.message.replace("/guess ", "").replace(" ", ""))}
@ -48,7 +46,7 @@ async def admin(context):
try:
admins = await context.client.get_participants(chat, filter=ChannelParticipantsAdmins)
except:
await context.edit('请在群组中运行')
await context.edit('请在群组中使用')
return True
admin_list = []
for admin in admins:
@ -278,11 +276,9 @@ async def pixiv(context):
try:
await context.edit('正在下载图片中 ...')
try:
r = requests.get('https://daidr.me/imageProxy/?url=' +
pixiv_json['illust']['meta_single_page']['original_image_url'])
r = requests.get(pixiv_json['illust']['meta_single_page']['original_image_url'].replace('i.pximg.net','i.pixiv.cat'))
except:
r = requests.get('https://daidr.me/imageProxy/?url=' +
pixiv_json['illust']['meta_pages'][pixiv_page - 1]['image_urls']['original'])
r = requests.get(pixiv_json['illust']['meta_pages'][pixiv_page - 1]['image_urls']['original'].replace('i.pximg.net','i.pixiv.cat'))
with open("pixiv.jpg", "wb") as code:
code.write(r.content)
await context.edit('正在上传图片中 ...')
@ -333,11 +329,9 @@ async def pixiv(context):
try:
await context.edit('正在下载图片中 ...')
try:
r = requests.get('https://daidr.me/imageProxy/?url=' +
pixiv_json['illust']['meta_single_page']['original_image_url'])
r = requests.get(pixiv_json['illust']['meta_single_page']['original_image_url'].replace('i.pximg.net','i.pixiv.cat'))
except:
r = requests.get('https://daidr.me/imageProxy/?url=' +
pixiv_json['illust']['meta_pages'][pixiv_page - 1]['image_urls']['original'])
r = requests.get(pixiv_json['illust']['meta_pages'][pixiv_page - 1]['image_urls']['original'].replace('i.pximg.net','i.pixiv.cat'))
with open("pixiv.jpg", "wb") as code:
code.write(r.content)
await context.edit('正在上传图片中 ...')