Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f92b4d7136 | ||
|
|
fbc766520a |
@@ -1,27 +0,0 @@
|
||||
[[source]]
|
||||
url = "https://mirrors.cloud.tencent.com/pypi/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
numpy = "==1.26.4"
|
||||
aiomysql = ">=0.1.1"
|
||||
Brotli = ">=1.0.9"
|
||||
creart = "==0.2.2"
|
||||
creart-graia = "==0.1.5"
|
||||
emoji = ">=2.2.0"
|
||||
graia-ariadne = "==0.9.8"
|
||||
graia-broadcast = "==0.19.2"
|
||||
graia-saya = "==0.0.16"
|
||||
jieba = ">=0.42.1"
|
||||
matplotlib = "==3.7.1"
|
||||
Pillow = "==9.5.0"
|
||||
redis = ">=4.5.5"
|
||||
scipy = ">=1.10.0"
|
||||
wordcloud = ">=1.8.2.2"
|
||||
|
||||
[dev-packages]
|
||||
ipython="*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.11"
|
||||
Generated
-1548
File diff suppressed because it is too large
Load Diff
@@ -117,8 +117,6 @@ async def room_data(app: Ariadne, source: Source, sender: Union[Friend, Group]):
|
||||
pic.draw_text("")
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
@@ -109,8 +109,6 @@ async def room_data_total(app: Ariadne, source: Source, sender: Union[Friend, Gr
|
||||
pic.draw_text("")
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
@@ -170,8 +170,6 @@ async def user_data(app: Ariadne, source: Source, sender: Union[Friend, Group],
|
||||
pic.draw_text("")
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
@@ -183,8 +183,6 @@ async def user_data_total(app: Ariadne, source: Source, sender: Union[Friend, Gr
|
||||
pic.draw_text("")
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
@@ -158,8 +158,6 @@ async def _help(app: Ariadne, sender: Union[Friend, Group]):
|
||||
# 底部版权信息,请务必保留此处
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
@@ -129,8 +129,6 @@ async def ranking(app: Ariadne,
|
||||
pic.draw_text("")
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
@@ -124,8 +124,6 @@ async def ranking_double(app: Ariadne,
|
||||
pic.draw_text("")
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
await app.send_message(sender, MessageChain(Image(base64=pic.base64())))
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ class StarBot:
|
||||
"""
|
||||
StarBot 类
|
||||
"""
|
||||
VERSION = "2.0.10"
|
||||
VERSION = "2.0.11"
|
||||
STARBOT_ASCII_LOGO = "\n".join(
|
||||
(
|
||||
r" _____ _ ____ _ ",
|
||||
@@ -35,7 +35,7 @@ class StarBot:
|
||||
r" \___ \| __/ _` | '__| _ < / _ \| __|",
|
||||
r" ____) | || (_| | | | |_) | (_) | |_ ",
|
||||
r" |_____/ \__\__,_|_| |____/ \___/ \__|",
|
||||
f" StarBot - (v{VERSION}) 2024-06-30",
|
||||
f" StarBot - (v{VERSION}) 2024-11-09",
|
||||
r" Github: https://github.com/Starlwr/StarBot",
|
||||
r"",
|
||||
r"",
|
||||
|
||||
@@ -69,8 +69,6 @@ class DynamicPicGenerator:
|
||||
pic.move_pos(0, 15)
|
||||
pic.draw_text_right(25, "Designed By StarBot", Color.GRAY)
|
||||
pic.draw_text_right(25, "https://github.com/Starlwr/StarBot", Color.LINK)
|
||||
pic.draw_text_right(25, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE)
|
||||
pic.draw_text_right(25, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
return pic.base64()
|
||||
|
||||
@@ -405,8 +405,6 @@ class LiveReportGenerator:
|
||||
pic.set_row_space(10)
|
||||
pic.draw_text_right(50, "Designed By StarBot", Color.GRAY, logo_limit)
|
||||
pic.draw_text_right(50, "https://github.com/Starlwr/StarBot", Color.LINK, logo_limit)
|
||||
pic.draw_text_right(50, "本Bot由薛定谔的大喵维护", Color.LIGHTBLUE, logo_limit)
|
||||
pic.draw_text_right(50, "https://gitea.phywyj.dynv6.net/wyj/starbot", Color.LINK, logo_limit)
|
||||
pic.crop_and_paste_bottom()
|
||||
|
||||
return pic.base64()
|
||||
@@ -671,7 +669,7 @@ class LiveReportGenerator:
|
||||
length = len(profits)
|
||||
indexs = list(range(0, length))
|
||||
|
||||
abs_max = math.ceil(max(max(profits), abs(min(profits)), 0.01))
|
||||
abs_max = math.ceil(max(max(profits), abs(min(profits))))
|
||||
start = -abs_max - (-abs_max % 10)
|
||||
end = abs_max + (-abs_max % 10)
|
||||
step = int((end - start) / 10)
|
||||
|
||||
@@ -153,12 +153,12 @@ class RankingGenerator:
|
||||
reverse_bar_x = face_x + offset
|
||||
top_bar_width = (width - face_size) / 2 + offset
|
||||
if top_count is None:
|
||||
top_count = max(max(counts), abs(min(counts)), 0.001)
|
||||
top_count = max(max(counts), abs(min(counts)))
|
||||
|
||||
chart = PicGenerator(width, (face_size * count) + (row_space * (count - 1)))
|
||||
chart.set_row_space(row_space)
|
||||
for i in range(count):
|
||||
bar_width = int(abs(counts[i]) / top_count * top_bar_width)
|
||||
bar_width = int(abs(counts[i]) / top_count * top_bar_width) if top_count != 0 else 0.1
|
||||
if bar_width != 0:
|
||||
if counts[i] > 0:
|
||||
bar = cls.__get_rank_bar_pic(bar_width, bar_height, start_color, end_color)
|
||||
|
||||
Reference in New Issue
Block a user