-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<jx3>[feat]统战YY;[feat]门派小药;[feat]骗子查询;[feat]活动日历;[feat]随机帖子;<develope…
…r_tools>[feat]在线反馈
- Loading branch information
1 parent
44b14a8
commit 844b211
Showing
62 changed files
with
578 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
from .adopt_bot import * | ||
from .mgr_tools import * | ||
try: | ||
from .failed import * | ||
except: | ||
pass | ||
from .feedback import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from src.tools.basic import * | ||
|
||
github_token = Config.ght | ||
|
||
async def createIssue(uin: str, comment: str): | ||
title = "【反馈】Inkar Suki · 使用反馈" | ||
date = convert_time(getCurrentTime()) | ||
msg = f"日期:{date}\n用户:{uin}\n留言:{comment}" | ||
url = f"https://api.github.com/repos/{Config.repo_name}/issues" | ||
headers = { | ||
"Authorization": f"token {github_token}", | ||
"Accept": "application/vnd.github.v3+json" | ||
} | ||
data = { | ||
"title": title, | ||
"body": msg | ||
} | ||
response = await post_url(url, headers=headers, json=data) | ||
return response | ||
|
||
feedback_ = on_command("feedback", aliases={"反馈"}, priority=5) | ||
|
||
@feedback_.handle() | ||
async def _(event: Event, args: Message = CommandArg()): | ||
msg = args.extract_plain_text() | ||
user = str(event.user_id) | ||
if len(msg) <= 8: | ||
await feedback_.finish("唔……反馈至少需要8字以上,包括标点符号。") | ||
else: | ||
await createIssue(user, msg) | ||
await feedback_.finish("已经将您的反馈内容提交至Inkar Suki GitHub,处理完毕后我们会通过电子邮件等方式通知您,音卡感谢您的反馈!") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from src.tools.basic import * | ||
|
||
async def getAnnounce(): | ||
final_url = f"{Config.jx3api_link}/data/news/announce?robot={bot}&token={token}" | ||
data = await get_api(final_url) | ||
return data["data"]["url"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from .api import * | ||
|
||
cheater = on_command("jx3_cheater", aliases={"查人", "骗子"}, priority=5) | ||
|
||
@cheater.handle() | ||
async def _(event: GroupMessageEvent, args: Message = CommandArg()): | ||
uin = args.extract_plain_text() | ||
if not checknumber(uin): | ||
await cheater.finish("唔……查人请给出纯数字的QQ号!") | ||
if int(uin) > 9999999999 or int(uin) < 100000: | ||
await cheater.finish("唔……该QQ号无效!") | ||
data = await getAwesomeRecord(uin) | ||
if not data: | ||
await cheater.finish("查询完毕,没有发现贴吧有Ta的记录哦~") | ||
else: | ||
await cheater.send("查询完毕,已发现贴吧记录,正在生成图片……") | ||
data = get_content_local(data) | ||
await cheater.finish(ms.image(data)) |
Oops, something went wrong.