From 8610b47a68696877d76384b9a7973a0d1fea907e Mon Sep 17 00:00:00 2001 From: Michael H Date: Sat, 2 Jun 2018 18:20:01 -0400 Subject: [PATCH] [V3 Admin] Announce ignore parameter modification (#1781) --- redbot/cogs/admin/admin.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/redbot/cogs/admin/admin.py b/redbot/cogs/admin/admin.py index 94a4032b8..648bb948d 100644 --- a/redbot/cogs/admin/admin.py +++ b/redbot/cogs/admin/admin.py @@ -264,20 +264,16 @@ class Admin: @announce.command(name="ignore") @commands.guild_only() @checks.guildowner_or_permissions(administrator=True) - async def announce_ignore(self, ctx, *, guild: discord.Guild = None): + async def announce_ignore(self, ctx): """ - Toggles whether the announcements will ignore the given server. - Defaults to the current server if none is provided. + Toggles whether the announcements will ignore the current server. """ - if guild is None: - guild = ctx.guild - - ignored = await self.conf.guild(guild).announce_ignore() - await self.conf.guild(guild).announce_ignore.set(not ignored) + ignored = await self.conf.guild(ctx.guild).announce_ignore() + await self.conf.guild(ctx.guild).announce_ignore.set(not ignored) verb = "will" if ignored else "will not" - await ctx.send("The server {} {} receive announcements.".format(guild.name, verb)) + await ctx.send(f"The server {ctx.guild.name} {verb} receive announcements.") async def _valid_selfroles(self, guild: discord.Guild) -> Tuple[discord.Role]: """