mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Merge pull request #137 from Kowlin/setowner
Made the setowner command from console more clear.
This commit is contained in:
commit
a102b8ff80
12
red.py
12
red.py
@ -143,7 +143,7 @@ async def _reload(*, module : str):
|
|||||||
await bot.say("Module reloaded.")
|
await bot.say("Module reloaded.")
|
||||||
|
|
||||||
|
|
||||||
@bot.command(pass_context=True, hidden=True) # Modified function, originally made by Rapptz
|
@bot.command(pass_context=True, hidden=True) # Modified function, originally made by Rapptz
|
||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
async def debug(ctx, *, code : str):
|
async def debug(ctx, *, code : str):
|
||||||
"""Evaluates code"""
|
"""Evaluates code"""
|
||||||
@ -283,7 +283,7 @@ def user_allowed(message):
|
|||||||
author = message.author
|
author = message.author
|
||||||
|
|
||||||
mod = bot.get_cog('Mod')
|
mod = bot.get_cog('Mod')
|
||||||
|
|
||||||
if mod is not None:
|
if mod is not None:
|
||||||
if settings.owner == author.id:
|
if settings.owner == author.id:
|
||||||
return True
|
return True
|
||||||
@ -357,7 +357,7 @@ def check_configs():
|
|||||||
if "@" not in settings.email:
|
if "@" not in settings.email:
|
||||||
input("You didn't enter a valid email. Restart Red and repeat the configuration process.")
|
input("You didn't enter a valid email. 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: !")
|
||||||
prefixes = []
|
prefixes = []
|
||||||
new_prefix = ""
|
new_prefix = ""
|
||||||
@ -434,7 +434,7 @@ def load_cogs():
|
|||||||
extensions = list_cogs()
|
extensions = list_cogs()
|
||||||
|
|
||||||
if extensions: print("\nLoading cogs...\n")
|
if extensions: print("\nLoading cogs...\n")
|
||||||
|
|
||||||
failed = []
|
failed = []
|
||||||
for extension in extensions:
|
for extension in extensions:
|
||||||
if extension in register:
|
if extension in register:
|
||||||
@ -461,7 +461,7 @@ def load_cogs():
|
|||||||
if extensions:
|
if extensions:
|
||||||
with open('data/red/cogs.json', "w") as f:
|
with open('data/red/cogs.json', "w") as f:
|
||||||
f.write(json.dumps(data))
|
f.write(json.dumps(data))
|
||||||
|
|
||||||
if failed:
|
if failed:
|
||||||
print("\nFailed to load: ", end="")
|
print("\nFailed to load: ", end="")
|
||||||
for m in failed:
|
for m in failed:
|
||||||
@ -486,7 +486,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
print("Once you're owner use !set prefix to set it.")
|
print("Once you're owner use !set prefix to set it.")
|
||||||
if settings.owner == "id_here":
|
if settings.owner == "id_here":
|
||||||
print("Owner has not been set yet. Do '[p]set owner' in chat to set yourself as owner.")
|
print("Owner has not been set yet. Do '{}set owner' in chat to set yourself as owner.".format(bot.command_prefix[0]))
|
||||||
else:
|
else:
|
||||||
owner.hidden = True # Hides the set owner command from help
|
owner.hidden = True # Hides the set owner command from help
|
||||||
yield from bot.login(settings.email, settings.password)
|
yield from bot.login(settings.email, settings.password)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user