mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-08 04:08:56 -05:00
Polish
This commit is contained in:
parent
e0aa5eb08a
commit
22514af4d9
@ -22,7 +22,7 @@ class Alias:
|
|||||||
async def _add_alias(self,ctx,command : str,*,to_execute):
|
async def _add_alias(self,ctx,command : str,*,to_execute):
|
||||||
"""Add an alias for a command
|
"""Add an alias for a command
|
||||||
|
|
||||||
Example: !alias add test penis @TwentySix"""
|
Example: !alias add test flip @Twentysix"""
|
||||||
server = ctx.message.server
|
server = ctx.message.server
|
||||||
if self.get_prefix(to_execute) == False:
|
if self.get_prefix(to_execute) == False:
|
||||||
to_execute = self.bot.command_prefix[0] + to_execute
|
to_execute = self.bot.command_prefix[0] + to_execute
|
||||||
|
|||||||
@ -791,7 +791,7 @@ def setup(bot):
|
|||||||
raise RuntimeError("You need to run `pip3 install youtube_dl`")
|
raise RuntimeError("You need to run `pip3 install youtube_dl`")
|
||||||
return
|
return
|
||||||
if opus is None:
|
if opus is None:
|
||||||
raise RuntimeError("You need to get the *.exe's and opus.dll from 26's github.")
|
raise RuntimeError("You need to install ffmpeg and opus. See \"https://github.com/Twentysix26/Red-DiscordBot/wiki/Requirements\"")
|
||||||
return
|
return
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
n = Audio(bot)
|
n = Audio(bot)
|
||||||
|
|||||||
@ -88,6 +88,7 @@ class CustomCommands:
|
|||||||
|
|
||||||
@commands.command(pass_context=True, no_pm=True)
|
@commands.command(pass_context=True, no_pm=True)
|
||||||
async def customcommands(self, ctx):
|
async def customcommands(self, ctx):
|
||||||
|
"""Shows custom commands list"""
|
||||||
server = ctx.message.server
|
server = ctx.message.server
|
||||||
if server.id in self.c_commands:
|
if server.id in self.c_commands:
|
||||||
cmdlist = self.c_commands[server.id]
|
cmdlist = self.c_commands[server.id]
|
||||||
|
|||||||
@ -21,10 +21,10 @@ class General:
|
|||||||
"Don't count on it", "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful"]
|
"Don't count on it", "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful"]
|
||||||
self.poll_sessions = []
|
self.poll_sessions = []
|
||||||
|
|
||||||
@commands.command()
|
@commands.command(hidden=True)
|
||||||
async def ping(self):
|
async def ping(self):
|
||||||
"""Pong."""
|
"""Pong."""
|
||||||
self.bot.say("Pong.")
|
await self.bot.say("Pong.")
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def choose(self, *choices):
|
async def choose(self, *choices):
|
||||||
|
|||||||
@ -160,7 +160,7 @@ class Mod:
|
|||||||
await self.bot.delete_message(x)
|
await self.bot.delete_message(x)
|
||||||
|
|
||||||
@commands.group(pass_context=True)
|
@commands.group(pass_context=True)
|
||||||
@checks.admin_or_permissions(ban_members=True)
|
@checks.is_owner()
|
||||||
async def blacklist(self, ctx):
|
async def blacklist(self, ctx):
|
||||||
"""Bans user from using the bot"""
|
"""Bans user from using the bot"""
|
||||||
if ctx.invoked_subcommand is None:
|
if ctx.invoked_subcommand is None:
|
||||||
@ -188,7 +188,7 @@ class Mod:
|
|||||||
|
|
||||||
|
|
||||||
@commands.group(pass_context=True)
|
@commands.group(pass_context=True)
|
||||||
@checks.admin_or_permissions(ban_members=True)
|
@checks.is_owner()
|
||||||
async def whitelist(self, ctx):
|
async def whitelist(self, ctx):
|
||||||
"""Users who will be able to use the bot"""
|
"""Users who will be able to use the bot"""
|
||||||
if ctx.invoked_subcommand is None:
|
if ctx.invoked_subcommand is None:
|
||||||
|
|||||||
2
red.py
2
red.py
@ -311,7 +311,7 @@ def wait_for_answer(author):
|
|||||||
choice = input("> ")
|
choice = input("> ")
|
||||||
if choice == "yes":
|
if choice == "yes":
|
||||||
settings.owner = author.id
|
settings.owner = author.id
|
||||||
print(author.name + " has been set as owner. A restart is required, maybe?")
|
print(author.name + " has been set as owner.")
|
||||||
lock = False
|
lock = False
|
||||||
else:
|
else:
|
||||||
print("setowner request has been ignored.")
|
print("setowner request has been ignored.")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user