More details
This commit is contained in:
parent
58979fc3aa
commit
cc89d07480
@ -25,14 +25,19 @@ class CCRole:
|
|||||||
|
|
||||||
@commands.group(no_pm=True)
|
@commands.group(no_pm=True)
|
||||||
async def ccrole(self, ctx):
|
async def ccrole(self, ctx):
|
||||||
"""Custom commands management"""
|
"""Custom commands management with roles
|
||||||
|
|
||||||
|
Highly customizable custom commands with role management."""
|
||||||
if not ctx.invoked_subcommand:
|
if not ctx.invoked_subcommand:
|
||||||
await ctx.send_help()
|
await ctx.send_help()
|
||||||
|
|
||||||
@ccrole.command(name="add")
|
@ccrole.command(name="add")
|
||||||
@checks.mod_or_permissions(administrator=True)
|
@checks.mod_or_permissions(administrator=True)
|
||||||
async def ccrole_add(self, ctx, command: str):
|
async def ccrole_add(self, ctx, command: str):
|
||||||
"""Adds a custom command with roles"""
|
"""Adds a custom command with roles
|
||||||
|
|
||||||
|
When adding text, put arguments in `{}` to eval them
|
||||||
|
Options: `{author}`, `{target}`, `{server}`, `{channel}`, `{message}`"""
|
||||||
command = command.lower()
|
command = command.lower()
|
||||||
if command in self.bot.all_commands:
|
if command in self.bot.all_commands:
|
||||||
await ctx.send("That command is already a standard command.")
|
await ctx.send("That command is already a standard command.")
|
||||||
@ -118,7 +123,9 @@ class CCRole:
|
|||||||
# Message to send
|
# Message to send
|
||||||
await ctx.send(
|
await ctx.send(
|
||||||
'What message should the bot say when using this command?\n'
|
'What message should the bot say when using this command?\n'
|
||||||
'Say `None` to send the default `Success!` message')
|
'Say `None` to send the default `Success!` message\n'
|
||||||
|
'Eval Options: `{author}`, `{target}`, `{server}`, `{channel}`, `{message}`\n'
|
||||||
|
'For example: `Welcome {target.mention} to {server.name}!`')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
answer = await self.bot.wait_for('message', timeout=120, check=check)
|
answer = await self.bot.wait_for('message', timeout=120, check=check)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user