Updated help messages.

doc_update
Joey Hines 2018-08-18 12:01:59 -05:00
parent 65f512304a
commit 8c3e1913b7
4 changed files with 18 additions and 25 deletions

2
bot.py
View File

@ -63,7 +63,7 @@ async def on_command_error(error, ctx):
if "Admin_Commands" in ctx.cog.__str__(): if "Admin_Commands" in ctx.cog.__str__():
return return
if isinstance(error, commands.CommandNotFound): 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): elif isinstance(error, commands.CommandOnCooldown):
return return
elif isinstance(error, commands.UserInputError): elif isinstance(error, commands.UserInputError):

View File

@ -36,8 +36,7 @@ class Add_Commands:
@commands.cooldown(5, 60, commands.BucketType.user) @commands.cooldown(5, 60, commands.BucketType.user)
async def add_base(self, ctx, x_pos: int, z_pos: int, *args): async def add_base(self, ctx, x_pos: int, z_pos: int, *args):
""" """
Adds your base to the database. Adds your base to the database. The base name is optional if this your first base.
The name is optional.
?add_base [X Coordinate] [Z Coordinate] [Base Name] ?add_base [X Coordinate] [Z Coordinate] [Base Name]
""" """
@ -62,8 +61,7 @@ class Add_Commands:
@commands.cooldown(5, 60, commands.BucketType.user) @commands.cooldown(5, 60, commands.BucketType.user)
async def add_shop(self, ctx, x_pos: int, z_pos: int, *args): async def add_shop(self, ctx, x_pos: int, z_pos: int, *args):
""" """
Adds your shop to the database. Adds your shop to the database. The name is shop optional if this your first shop.
The name is optional.
?add_shop [X Coordinate] [Z Coordinate] [Shop Name] ?add_shop [X Coordinate] [Z Coordinate] [Shop Name]
""" """
@ -116,9 +114,9 @@ class Add_Commands:
@commands.cooldown(5, 60, commands.BucketType.user) @commands.cooldown(5, 60, commands.BucketType.user)
async def add_item(self, ctx, item_name: str, quantity: int, diamond_price: int, *args): async def add_item(self, ctx, item_name: str, quantity: int, diamond_price: int, *args):
""" """
Adds an item to a shop's inventory. Adds an item to a shop's inventory. If you have one shop, the shop name is not required.
Quantity for Diamond Price. Quantity for Diamond Price. eg. 32 Dirt for 1D
?additem [Item Name] [Quantity] [Price] [Shop name] ?additem [Item Name] [Quantity] [Price] [Shop name]
""" """
shop_name = get_name(args) shop_name = get_name(args)
try: try:

View File

@ -6,7 +6,9 @@ from bot import bot_commands
class Edit_Commands: class Edit_Commands:
"""
Commands for editing your stuff in Geoffrey.
"""
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
@ -14,8 +16,7 @@ class Edit_Commands:
@commands.cooldown(5, 60, commands.BucketType.user) @commands.cooldown(5, 60, commands.BucketType.user)
async def edit_pos(self, ctx, x_pos: int, y_pos: int, *args): 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] ?edit_pos [X Coordinate] [Z Coordinate] [Location Name]
""" """
loc = get_name(args) loc = get_name(args)
@ -32,8 +33,7 @@ class Edit_Commands:
@commands.cooldown(5, 60, commands.BucketType.user) @commands.cooldown(5, 60, commands.BucketType.user)
async def edit_tunnel(self, ctx, tunnel_color: str, tunnel_number: int, *args): 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] ?edit_tunnel [Tunnel Color] [Tunnel Number] [Location Name]
""" """
loc = get_name(args) loc = get_name(args)
@ -53,9 +53,8 @@ class Edit_Commands:
@commands.cooldown(5, 60, commands.BucketType.user) @commands.cooldown(5, 60, commands.BucketType.user)
async def edit_name(self, ctx, new_name: str, current_name: str): async def edit_name(self, ctx, new_name: str, current_name: str):
""" """
Edits the name of a location 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"
IF A NAME HAS SPACES IN IT YOU NEED TO WRAP IT IN QUOTATION MARKS. ie "Cool Shop 123"
?edit_name [New Name] [Current Name] ?edit_name [New Name] [Current Name]
""" """
try: try:

View File

@ -56,11 +56,10 @@ class Search_Commands:
Finds all the locations around a certain point. Finds all the locations around a certain point.
The radius defaults to 200 blocks if no value is given. The radius defaults to 200 blocks if no value is given.
Default dimension is overworld. 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 radius = 200
dimension = 'Overworld' dimension = 'Overworld'
@ -97,8 +96,7 @@ class Search_Commands:
async def selling(self, ctx, item_name: str): async def selling(self, ctx, item_name: str):
""" """
Lists all the shops selling an item Lists all the shops selling an item
?selling [item]
?selling [item]
""" """
try: try:
result = bot_commands.selling(item_name) result = bot_commands.selling(item_name)
@ -111,10 +109,8 @@ class Search_Commands:
async def info(self, ctx, * args): async def info(self, ctx, * args):
""" """
Displays info about a location. Displays info about a location.
If the location is a shop, it displays the shop's inventory. If the location is a shop, it displays the shop's inventory.
?info [Location Name]
?info [Location Name]
""" """
loc = get_name(args) loc = get_name(args)
try: try: