mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Core] Print a link to the guide explaining how to obtain token when Red prompts for it (#3204)
* Update cli.py * Create 3204.enhance.rst
This commit is contained in:
parent
a36e95c286
commit
b72c05d3d4
1
changelog.d/3204.enhance.rst
Normal file
1
changelog.d/3204.enhance.rst
Normal file
@ -0,0 +1 @@
|
||||
When Red prompts for token, it will now print a link to the guide explaining how to obtain a token.
|
||||
@ -4,6 +4,8 @@ import logging
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
from discord import __version__ as discord_version
|
||||
|
||||
|
||||
def confirm(text: str, default: Optional[bool] = None) -> bool:
|
||||
if default is None:
|
||||
@ -39,7 +41,12 @@ def interactive_config(red, token_set, prefix_set, *, print_header=True):
|
||||
print("Red - Discord Bot | Configuration process\n")
|
||||
|
||||
if not token_set:
|
||||
print("Please enter a valid token:")
|
||||
print(
|
||||
"Please enter a valid token.\n"
|
||||
"You can find out how to obtain a token with this guide"
|
||||
' (section "Creating a Bot Account"):\n'
|
||||
f"https://discordpy.readthedocs.io/en/v{discord_version}/discord.html#creating-a-bot-account"
|
||||
)
|
||||
while not token:
|
||||
token = input("> ")
|
||||
if not len(token) >= 50:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user