Added prefix flag for Startup (Standard "<")

This commit is contained in:
Lukas Blacha
2023-02-08 17:57:28 +01:00
parent 443eec8320
commit 116e7e6d15

View File

@@ -29,6 +29,7 @@ logging.basicConfig(level=logging.INFO)
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--token", help="Bot TOKEN")
parser.add_argument("-c", "--cores", help="Number of Cores for ffmpeg (Standard 2)")
parser.add_argument("-p", "--prefix", help="Provides the Prefix for the bot (Standard <)")
args = parser.parse_args()
@@ -38,7 +39,13 @@ else:
threads = int(args.cores)
if args.token == None:
if args.prefix == None
b_prefix = "<"
else:
b_prefix = str(args.prefix)
if args.token is None:
print(f"{banner}\n\nPLEASE PROVIDE BOT A TOKEN BY RUNNING LIKE THE FOLLOWING:")
print("\n")
print(">>> python3 Music-Bot.py -t TOKEN <<<")
@@ -112,7 +119,7 @@ else:
intents.message_content = True
bot = commands.Bot(
command_prefix=commands.when_mentioned_or("!"),
command_prefix=commands.when_mentioned_or(b_prefix),
description="Relatively simple music bot example",
intents=intents, help_command=None
)
@@ -124,6 +131,7 @@ else:
print(f"Bot Version: {version} ({branch})")
print(f"Bot: {bot.user} (ID: {bot.user.id})")
print(f"Threads for ffmpeg: {threads}")
print(f"Prefix: {b_prefix}")
print(
f"Invitation LINK: https://discord.com/api/oauth2/authorize?client_id={bot.user.id}&permissions=968552344896&scope=bot%20applications.commands")
print("------")