From fcbcbe2cde3b22cc434cd34fb02c1ad58aee67a5 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 25 Jul 2020 15:08:43 +0100 Subject: [PATCH] Making it the command arguments optional for prefix and help --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4d5be542..1c9265f8 100644 --- a/main.py +++ b/main.py @@ -2,6 +2,7 @@ import asyncio import datetime import string from contextlib import closing +from typing import Optional import discord import mariadb @@ -180,8 +181,8 @@ async def restart(ctx): await client.logout() -@client.command(name='help') -async def _help(ctx, *, command: str = None): +@client.command(name='help', aliases=["Help"]) +async def _help(ctx, *, command: Optional[str] = None): """Shows help about a command or the bot""" try: @@ -206,7 +207,7 @@ async def _help(ctx, *, command: str = None): @client.command(name="prefix", aliases=["Prefix"]) @guild_only() @has_permissions(manage_guild=True) -async def change_prefix(ctx, new: str = None): +async def change_prefix(ctx, new: Optional[str] = None): """View/Change Guild Prefix""" # As long as a new prefix has been given and is less than 5 characters