PDMI/LBI_PiPy/modules/panic/0.0.1/__init__.py
2019-04-28 16:49:02 +00:00

20 lines
641 B
Python

from modules.base import BaseClass
class MainClass(BaseClass):
name = "Panic"
help_active = True
help = {
"description": "Dans quel état est Nikola Tesla",
"commands": {
"`{prefix}{command}`": "Donne l'état actuel de Nikola Tesla",
}
}
command_text = "panic"
async def command(self, message, args, kwargs):
temperature = 0
with open("/sys/class/thermal/thermal_zone0/temp") as f:
temperature = int(f.read().rstrip("\n")) / 1000
await message.channel.send("Nikola est à {temperature}°C".format(temperature=temperature))