Skip to content

Commit

Permalink
修复:Sever status 指令有可能出错
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonely-Sails committed Aug 3, 2024
1 parent b2d7010 commit 2690b5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BotServer/Plugins/Commands/Server/Status.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def draw_chart(data: dict):
ram_bar = pyplot.barh(pos + 1, ram, color='blue')
count += 1
pyplot.legend((cpu_bar, ram_bar), ('CPU', 'RAM'))
pyplot.yticks([(count * 2 + 0.5) for count in range(len(data))], names, fontproperties=font)
pyplot.yticks([(count * 2 + 0.5) for count in range(len(names))], names, fontproperties=font)
buffer = BytesIO()
pyplot.savefig(buffer, format='png')
pyplot.clf()
Expand Down

0 comments on commit 2690b5d

Please sign in to comment.