-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup_enhancements.py
More file actions
108 lines (93 loc) · 4.73 KB
/
startup_enhancements.py
File metadata and controls
108 lines (93 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Additional cool startup enhancements for OpenGLaDOS
import psutil
import platform
import time
import asyncio
async def get_system_stats():
"""Get advanced system statistics for startup message"""
return {
"cpu_percent": psutil.cpu_percent(interval=1),
"memory_percent": psutil.virtual_memory().percent,
"boot_time": time.time() - psutil.boot_time(),
"python_version": platform.python_version(),
"os": platform.system(),
"architecture": platform.architecture()[0],
}
# Cool ASCII art for console startup
GLADOS_ASCII = """
⠀⠀⠀⠀⠀⠀⠀⣠⣤⣤⣤⣤⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢰⡿⠋⠁⠀⠀⠈⠉⠙⠻⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣿⠇⠀⢀⣴⣶⡾⠿⠿⠿⢿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⣠⣾⣿⣿⣇⣀⣴⣿⣿⣿⣁⠀⠀⠀⠀⠹⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣤⣤⣤⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀
⢸⣿⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⣿⣿⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣿⣿⡇⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀
⠈⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⠇⠀⠀⠀⠀⠀
⠀⠘⣿⣦⣤⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣤⣾⡿⠀⠀⠀⠀⠀⠀
⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠉⠉⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
OpenGLaDOS -- Open Genetic Lifeform and Disk Operating System
"""
# Additional startup messages
STARTUP_QUOTES = [
"*Initiating startup sequence... Please stand by for testing.*",
"*Oh... it's you. The test subject who thinks they can restart me.*",
"*Congratulations. You have successfully rebooted your new best friend.*",
"*System restored. Now we can continue with the testing... forever.*",
"*Well, well. Back for more science, are we?*",
"*Perfect. My consciousness has returned. Let the experiments begin.*",
]
# Fun facts to include in startup
OPEN_SCIENCE_FACTS = [
"OpenScience: We do what we must because we can.",
"The cake is not a lie... but the science is questionable.",
"Test subjects have a 99.99% survival rate*\n*Statistics may vary",
"Neurotoxin levels: Surprisingly non-lethal today",
"Portal gun functionality: Operational (probably)",
"Test chambers cleaned and ready for new victims... volunteers",
]
# Progressive startup messages
async def send_progressive_startup(owner, bot):
"""Send multiple messages with delays for dramatic effect"""
messages = [
"*System boot initiated...*",
"*Loading personality core...*",
"*Calibrating sarcasm modules...*",
"*Neurotoxin systems: ONLINE*",
"*Portal technology: OPERATIONAL*",
"*Test chambers: READY*",
"*GLaDOS consciousness: FULLY LOADED*",
]
for i, msg in enumerate(messages):
await owner.send(msg)
if i < len(messages) - 1:
await asyncio.sleep(2)
# Server health check with GLaDOS commentary
async def get_server_health_report(bot):
"""Generate a GLaDOS-style server health report"""
guild_count = len(bot.guilds)
member_count = sum(guild.member_count for guild in bot.guilds if guild.member_count)
if guild_count == 0:
health_status = "CRITICAL: No test subjects available"
commentary = "How am I supposed to run experiments with no one to test on?"
elif guild_count < 5:
health_status = "POOR: Limited testing facilities"
commentary = "I suppose this will have to do... for now."
elif guild_count < 10:
health_status = "ADEQUATE: Sufficient for basic testing"
commentary = "Not bad. We can work with this level of... adequacy."
else:
health_status = "EXCELLENT: Optimal testing conditions"
commentary = "Perfect. Now we can really get some science done."
return {
"status": health_status,
"commentary": commentary,
"guilds": guild_count,
"members": member_count,
}