speak: add

This commit is contained in:
Ave Ozkal 2018-12-25 14:43:23 +03:00
parent 5eac0b1a81
commit d38b1a8065
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
2 changed files with 14 additions and 7 deletions

View file

@ -18,13 +18,6 @@ class AdminCog:
def check_if_bot_manager(ctx): def check_if_bot_manager(ctx):
return any(r.id == config.bot_manager_role_id for r in ctx.author.roles) return any(r.id == config.bot_manager_role_id for r in ctx.author.roles)
@commands.guild_only()
@commands.check(check_if_staff)
@commands.command(aliases=['echo'], hidden=True)
async def say(self, ctx, *, the_text: str):
"""Repeats a given text, staff only."""
await ctx.send(the_text)
@commands.guild_only() @commands.guild_only()
@commands.check(check_if_bot_manager) @commands.check(check_if_bot_manager)
@commands.command(name='exit', hidden=True) @commands.command(name='exit', hidden=True)

View file

@ -221,6 +221,20 @@ class ModCog:
await log_channel.send(chan_message) await log_channel.send(chan_message)
await ctx.send(f"{safe_name} is now b&. 👍") await ctx.send(f"{safe_name} is now b&. 👍")
@commands.guild_only()
@commands.check(check_if_staff)
@commands.command(aliases=['echo'])
async def say(self, ctx, *, the_text: str):
"""Repeats a given text, staff only."""
await ctx.send(the_text)
@commands.guild_only()
@commands.check(check_if_staff)
@commands.command()
async def speak(self, ctx, channel: discord.TextChannel, *, the_text: str):
"""Repeats a given text in a given channel, staff only."""
await channel.send(the_text)
@commands.guild_only() @commands.guild_only()
@commands.bot_has_permissions(ban_members=True) @commands.bot_has_permissions(ban_members=True)
@commands.check(check_if_staff) @commands.check(check_if_staff)