From 8c3e1913b7ed56e69d23830fecb7d4cda7fb829c Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Sat, 18 Aug 2018 12:01:59 -0500 Subject: [PATCH] Updated help messages. --- bot.py | 2 +- cogs/Add_Commands.py | 12 +++++------- cogs/Edit_Commands.py | 15 +++++++-------- cogs/Search_Commands.py | 14 +++++--------- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/bot.py b/bot.py index c9170b6..9312d92 100644 --- a/bot.py +++ b/bot.py @@ -63,7 +63,7 @@ async def on_command_error(error, ctx): if "Admin_Commands" in ctx.cog.__str__(): return if isinstance(error, commands.CommandNotFound): - error_str = 'Command not found, ding dongs like you can use ?help to see all the commands this bot can do.' + return elif isinstance(error, commands.CommandOnCooldown): return elif isinstance(error, commands.UserInputError): diff --git a/cogs/Add_Commands.py b/cogs/Add_Commands.py index bcc2380..5e66666 100644 --- a/cogs/Add_Commands.py +++ b/cogs/Add_Commands.py @@ -36,8 +36,7 @@ class Add_Commands: @commands.cooldown(5, 60, commands.BucketType.user) async def add_base(self, ctx, x_pos: int, z_pos: int, *args): """ - Adds your base to the database. - The name is optional. + Adds your base to the database. The base name is optional if this your first base. ?add_base [X Coordinate] [Z Coordinate] [Base Name] """ @@ -62,8 +61,7 @@ class Add_Commands: @commands.cooldown(5, 60, commands.BucketType.user) async def add_shop(self, ctx, x_pos: int, z_pos: int, *args): """ - Adds your shop to the database. - The name is optional. + Adds your shop to the database. The name is shop optional if this your first shop. ?add_shop [X Coordinate] [Z Coordinate] [Shop Name] """ @@ -116,9 +114,9 @@ class Add_Commands: @commands.cooldown(5, 60, commands.BucketType.user) async def add_item(self, ctx, item_name: str, quantity: int, diamond_price: int, *args): """ - Adds an item to a shop's inventory. - Quantity for Diamond Price. - ?additem [Item Name] [Quantity] [Price] [Shop name] + Adds an item to a shop's inventory. If you have one shop, the shop name is not required. + Quantity for Diamond Price. eg. 32 Dirt for 1D + ?additem [Item Name] [Quantity] [Price] [Shop name] """ shop_name = get_name(args) try: diff --git a/cogs/Edit_Commands.py b/cogs/Edit_Commands.py index defb37d..b9ddf3f 100644 --- a/cogs/Edit_Commands.py +++ b/cogs/Edit_Commands.py @@ -6,7 +6,9 @@ from bot import bot_commands class Edit_Commands: - + """ + Commands for editing your stuff in Geoffrey. + """ def __init__(self, bot): self.bot = bot @@ -14,8 +16,7 @@ class Edit_Commands: @commands.cooldown(5, 60, commands.BucketType.user) async def edit_pos(self, ctx, x_pos: int, y_pos: int, *args): """ - Edits the position of a location - + Edits the position of a location ?edit_pos [X Coordinate] [Z Coordinate] [Location Name] """ loc = get_name(args) @@ -32,8 +33,7 @@ class Edit_Commands: @commands.cooldown(5, 60, commands.BucketType.user) async def edit_tunnel(self, ctx, tunnel_color: str, tunnel_number: int, *args): """ - Edits the tunnel of a location - + Edits the tunnel of a location ?edit_tunnel [Tunnel Color] [Tunnel Number] [Location Name] """ loc = get_name(args) @@ -53,9 +53,8 @@ class Edit_Commands: @commands.cooldown(5, 60, commands.BucketType.user) async def edit_name(self, ctx, new_name: str, current_name: str): """ - Edits the name of a location - - IF A NAME HAS SPACES IN IT YOU NEED TO WRAP IT IN QUOTATION MARKS. ie "Cool Shop 123" + Edits the name of a location + IF A NAME HAS SPACES IN IT YOU NEED TO WRAP IT IN QUOTATION MARKS. eg. "Cool Shop 123" ?edit_name [New Name] [Current Name] """ try: diff --git a/cogs/Search_Commands.py b/cogs/Search_Commands.py index ff0bfdd..c9f72f7 100644 --- a/cogs/Search_Commands.py +++ b/cogs/Search_Commands.py @@ -56,11 +56,10 @@ class Search_Commands: Finds all the locations around a certain point. The radius defaults to 200 blocks if no value is given. Default dimension is overworld. + ?find_around [X Coordinate] [Z Coordinate] [Radius] [Optional Flags] - ?find_around [X Coordinate] [Z Coordinate] [Radius] [Optional Flags] - - Optional Flags: - -d [dimension] + Optional Flags: + -d [dimension] """ radius = 200 dimension = 'Overworld' @@ -97,8 +96,7 @@ class Search_Commands: async def selling(self, ctx, item_name: str): """ Lists all the shops selling an item - - ?selling [item] + ?selling [item] """ try: result = bot_commands.selling(item_name) @@ -111,10 +109,8 @@ class Search_Commands: async def info(self, ctx, * args): """ Displays info about a location. - If the location is a shop, it displays the shop's inventory. - - ?info [Location Name] + ?info [Location Name] """ loc = get_name(args) try: