Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ async def on_message(message):
await send_big_message(message,response_string)
else:
await message.channel.send(response_string)
elif msg_args[1].upper().startswith(' CTOF'):
text_to_parse=msg_args[1][5:]
response_string=hf.c_to_f(text_to_parse)
await message.channel.send(response_string)
elif msg_args[1].upper().startswith(' FTOC'):
text_to_parse=msg_args[1][5:]
response_string=hf.f_to_c(text_to_parse)
await message.channel.send(response_string)
elif msg_args[1].upper().startswith(' HELP'):
await message.channel.send(hf.help_text())
else:
Expand Down
6 changes: 6 additions & 0 deletions hojicha_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,9 @@ def binary_to_text(string):
#convert each 8 length string into a character
message=message+text_from_bits(char)
return message
#copy right 2069 glosh co any distrubtion of this soft were which was entirly made by me and no body else will result in instant death
def c_to_f(value):
return value * 1.8 + 32
def f_to_c(value):
i_dont_know_how_to_do_complex_math_so_I_am_doing_this = value - 32
return i_dont_know_how_to_do_complex_math_so_I_am_doing_this / 1.8