mirror of
https://github.com/LuisMayo/ace-attorney-discord-bot.git
synced 2025-06-18 14:25:36 -04:00
Added invite link
This commit is contained in:
parent
cb03b34cd4
commit
b7e928d6ca
1
ace-attorney-bot
Submodule
1
ace-attorney-bot
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 277c6211e5074f157e097c9c01cac4c22c622725
|
@ -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: ""
|
||||
|
8
main.py
8
main.py
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user