mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 19:58:54 -05:00
Adjustment to PR
This commit is contained in:
parent
4994c40bd3
commit
e0aad82966
47
red.py
47
red.py
@ -43,6 +43,7 @@ async def on_ready():
|
|||||||
users = str(len([m for m in bot.get_all_members()]))
|
users = str(len([m for m in bot.get_all_members()]))
|
||||||
servers = str(len(bot.servers))
|
servers = str(len(bot.servers))
|
||||||
channels = str(len([c for c in bot.get_all_channels()]))
|
channels = str(len([c for c in bot.get_all_channels()]))
|
||||||
|
bot.uptime = int(time.perf_counter())
|
||||||
print('------')
|
print('------')
|
||||||
print(bot.user.name + " is now online.")
|
print(bot.user.name + " is now online.")
|
||||||
print('------')
|
print('------')
|
||||||
@ -51,7 +52,6 @@ async def on_ready():
|
|||||||
print(channels + " channels")
|
print(channels + " channels")
|
||||||
print(users + " users")
|
print(users + " users")
|
||||||
print("\n{0} active cogs with {1} commands\n".format(str(len(bot.cogs)), str(len(bot.commands))))
|
print("\n{0} active cogs with {1} commands\n".format(str(len(bot.cogs)), str(len(bot.commands))))
|
||||||
bot.uptime = int(time.perf_counter())
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_command(command, ctx):
|
async def on_command(command, ctx):
|
||||||
@ -345,36 +345,25 @@ def check_folders():
|
|||||||
|
|
||||||
def check_configs():
|
def check_configs():
|
||||||
if settings.bot_settings == settings.default_settings:
|
if settings.bot_settings == settings.default_settings:
|
||||||
print("Welcome to Red. A modular Discord bot!")
|
print("Red - First run configuration\n")
|
||||||
print("Please choose on how you want to log in, you can either choose a normal or bot account.")
|
print("You either need a normal account or a bot account to use Red. *Do not* use your own.")
|
||||||
print("For more information on bot accounts visit: https://discordapp.com/developers/docs/topics/oauth2#bot-vs-user-accounts")
|
print("For more information on bot accounts see: https://discordapp.com/developers/docs/topics/oauth2#bot-vs-user-accounts")
|
||||||
print("If you don't know that you NEED a bot-tagged account, don't use one. There are more than just cosmetic differences. If still in doubt, select email")
|
print("If you're not interested in a bot account, create a normal account on https://discordapp.com")
|
||||||
print("Please choose if you want to use a Email or Token.")
|
print("Otherwise make one and copy the token from https://discordapp.com/developers/applications/me")
|
||||||
settings.login_type = input("\n'email' or 'token'> ").lower()
|
print("\nType your email or token:")
|
||||||
# Deny empty logintype!
|
|
||||||
if not settings.login_type:
|
choice = input("> ")
|
||||||
input("You have to choose either 'email' or 'token'")
|
|
||||||
exit(1)
|
if "@" not in choice and len(choice) >= 50: #Assuming token
|
||||||
# Check if input is either email or token, if email to on to email & password. else go to token input.
|
settings.login_type = "token"
|
||||||
if settings.login_type == "email":
|
settings.email = choice
|
||||||
print("If you don't have one, create a NEW ACCOUNT for Red. Do *not* use yours. (https://discordapp.com)")
|
elif "@" in choice:
|
||||||
settings.email = input("\nEmail> ")
|
settings.login_type = "email"
|
||||||
|
settings.email = choice
|
||||||
settings.password = input("\nPassword> ")
|
settings.password = input("\nPassword> ")
|
||||||
if not settings.email:
|
|
||||||
input("Email cannot be empty. Restart Red and repeat the configuration process.")
|
|
||||||
exit(1)
|
|
||||||
if not settings.password:
|
|
||||||
input("Password cannot be empty. Restart Red and repeat the configuration process.")
|
|
||||||
exit(1)
|
|
||||||
elif settings.login_type == "token":
|
|
||||||
print("Get your bot token from: https://discordapp.com/developers/applications/me")
|
|
||||||
print("If you don't have a application or a bot token, make one and a bot account then copy the token.")
|
|
||||||
settings.email = input("\nToken> ")
|
|
||||||
if not settings.email:
|
|
||||||
input("Token cannot be empty. Restart Red and repeat the configuration process.")
|
|
||||||
exit(1)
|
|
||||||
else:
|
else:
|
||||||
input("Please enter 'email' or 'token'. Restart Red and repeat the configuration process.")
|
os.remove('data/red/settings.json')
|
||||||
|
input("Invalid input. Restart Red and repeat the configuration process.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
print("\nChoose a prefix (or multiple ones, one at once) for the commands. Type exit when you're done. Example prefix: !")
|
print("\nChoose a prefix (or multiple ones, one at once) for the commands. Type exit when you're done. Example prefix: !")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user