Added invite link

This commit is contained in:
Luis Mayo Valbuena 2022-10-01 20:52:31 +02:00
parent cb03b34cd4
commit b7e928d6ca
3 changed files with 9 additions and 1 deletions

1
ace-attorney-bot Submodule

@ -0,0 +1 @@
Subproject commit 277c6211e5074f157e097c9c01cac4c22c622725

View File

@ -4,3 +4,4 @@ deletionDelay: "0" # if set to 0 (or lower), the deletion queue will be disabled
max_tasks:
per_guild: 100
per_user: 5
invite_link: ""

View File

@ -28,7 +28,7 @@ def loadConfig():
try:
with open("config.yaml") as file:
config = yaml.load(file, Loader=yaml.FullLoader)
global token, prefix, deletionDelay, max_per_guild, max_per_user
global token, prefix, deletionDelay, max_per_guild, max_per_user, invite_link
token = config["token"].strip()
if not token:
@ -52,6 +52,7 @@ def loadConfig():
if not max_per_user:
max_per_user = 5
invite_link = config["invite_link"]
return True
except KeyError as keyErrorException:
print(f"The mapping key {keyErrorException} is missing in the config file (config.yaml)!")
@ -101,6 +102,11 @@ async def music(context):
music_string = '\n- '.join(music_arr)
await context.reply('The available music is:\n- ' + music_string)
@courtBot.command()
async def invite(context):
if invite_link is not None:
await context.reply(invite_link)
@courtBot.command()
async def help(context):
dummyAmount = random.randint(2, 150)