bot: Made licence an optional arg
This commit is contained in:
parent
c4ae4561e3
commit
fb9295c260
@ -64,7 +64,7 @@ async def license(ctx):
|
|||||||
await ctx.response.send_message(f"Error getting license\n" + r.text,ephemeral=True)
|
await ctx.response.send_message(f"Error getting license\n" + r.text,ephemeral=True)
|
||||||
|
|
||||||
@tree.command(name="createsite", description="Create a new WordPress site")
|
@tree.command(name="createsite", description="Create a new WordPress site")
|
||||||
async def createsite(ctx, domain: str, licence: str):
|
async def createsite(ctx, domain: str, licence: str = None):
|
||||||
if FREE_LICENCE == True: # If free licences are enabled then auto generate a licence
|
if FREE_LICENCE == True: # If free licences are enabled then auto generate a licence
|
||||||
r = requests.post(f"http://{Master_IP}:{Master_Port}/add-licence",headers={"key":os.getenv('LICENCE_KEY')})
|
r = requests.post(f"http://{Master_IP}:{Master_Port}/add-licence",headers={"key":os.getenv('LICENCE_KEY')})
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
|
Loading…
Reference in New Issue
Block a user