From 47b12c9793dd638531abd1c3c224a44e6bf1c358 Mon Sep 17 00:00:00 2001 From: dkay0670 Date: Sat, 17 Feb 2024 11:52:57 -0800 Subject: [PATCH 1/2] Remove extra 'htd' in htd help --- techsupport_bot/commands/htd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/techsupport_bot/commands/htd.py b/techsupport_bot/commands/htd.py index 47ed66a61..43e9517cc 100644 --- a/techsupport_bot/commands/htd.py +++ b/techsupport_bot/commands/htd.py @@ -128,7 +128,7 @@ def perform_op_on_list(self, equation_list: list) -> int: " encodings (bianary, hex, base 10, and ascii)" ), usage=( - "`htd [value]`\nAccepts numbers in the following formats:\n0x" + "`[value]`\nAccepts numbers in the following formats:\n0x" " (hex)\n0b (binary) \nNo prefix (assumed ascii)" ), ) From 1db6b17d41b362eb4f5e8959c7fe0ce9d999f933 Mon Sep 17 00:00:00 2001 From: dkay0670 Date: Sat, 17 Feb 2024 12:21:33 -0800 Subject: [PATCH 2/2] Fix typos and help for htd command --- techsupport_bot/commands/htd.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/techsupport_bot/commands/htd.py b/techsupport_bot/commands/htd.py index 43e9517cc..3b84b63ba 100644 --- a/techsupport_bot/commands/htd.py +++ b/techsupport_bot/commands/htd.py @@ -1,6 +1,5 @@ """ -Convert a value or evalute a mathematical expression to decimal, hex, binary, and ascii encoding - +Convert a value or evaluate a mathematical expression to decimal, hex, binary, and ascii encoding """ import discord @@ -24,7 +23,7 @@ class Htd(cogs.BaseCog): def split_nicely(self, str_to_split: str) -> list: """Takes an input string of an equation, and - returns a list with numbers and operators in seperate parts + returns a list with numbers and operators in separate parts Args: str_to_split (str): The equation to parse @@ -65,7 +64,7 @@ def convert_value_to_integer(self, val: str) -> int: val (str): The given value to convert Returns: - int: The value represeted as an integer + int: The value represented as an integer """ if val.replace("-", "").startswith("0x"): @@ -125,11 +124,11 @@ def perform_op_on_list(self, equation_list: list) -> int: brief="Convert values to different bases", description=( "Takes a value and returns the value in different bases and" - " encodings (bianary, hex, base 10, and ascii)" + " encodings (binary, hex, base 10, and ascii)" ), usage=( "`[value]`\nAccepts numbers in the following formats:\n0x" - " (hex)\n0b (binary) \nNo prefix (assumed ascii)" + " (hex)\n0b (binary) \nNo prefix (assumed decimal)" ), ) async def htd(self, ctx, *, val_to_convert): @@ -143,7 +142,7 @@ async def htd(self, ctx, *, val_to_convert): def clean_input(self, input: str) -> str: """A method to clean up input to be better processed by later functions - This replaces "#" with "0x" to recoginzed "#" as hex + This replaces "#" with "0x" to recognized "#" as hex It also removes quotes and spaces Args: