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