updated the message

This commit is contained in:
phixxy 2024-02-02 23:40:56 -08:00
parent cdcf11fabd
commit 96af9eb63e

View file

@ -44,8 +44,8 @@ class InkyScreen(commands.Cog):
y = 0 y = 0
for line in text: for line in text:
if y <= width: if y <= width:
draw.text((x, y), line, self.display.YELLOW) draw.text((x, y), line, self.display.YELLOW, font=ImageFont.load_default(size=24))
y -= height_diff y += height_diff
else: else:
self.bot.logger.warning("InkyScreen: Text too long to fit on image.") self.bot.logger.warning("InkyScreen: Text too long to fit on image.")
image = image.rotate(180) image = image.rotate(180)
@ -73,11 +73,11 @@ class InkyScreen(commands.Cog):
message_list.append(f"IP: {self.get_ip_address()}") message_list.append(f"IP: {self.get_ip_address()}")
message_list.append(f"Time: {time.strftime('%H:%M:%S')}") message_list.append(f"Time: {time.strftime('%H:%M:%S')}")
message_list.append(f"Uptime: {self.get_uptime()}") message_list.append(f"Uptime: {self.get_uptime()}")
message_list.append(f"Servers: {len(self.bot.guilds)}") #message_list.append(f"Servers: {len(self.bot.guilds)}")
cpu_percent = psutil.cpu_percent() cpu_percent = psutil.cpu_percent()
memory_info = psutil.virtual_memory() memory_info = psutil.virtual_memory()
message_list.append(f"CPU: {cpu_percent}%") message_list.append(f"CPU: {cpu_percent}%")
message_list.append(f"Memory: {memory_info.used}/{memory_info.total}") message_list.append(f"Memory: {memory_info.used/100000}/{memory_info.total/100000}GB")
except Exception as e: except Exception as e:
self.bot.logger.error(f"Error generating InkyScreen message: {e}") self.bot.logger.error(f"Error generating InkyScreen message: {e}")
return message_list return message_list