mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[V3 Admin] Announce ignore parameter modification (#1781)
This commit is contained in:
parent
2ab8890540
commit
8610b47a68
@ -264,20 +264,16 @@ class Admin:
|
|||||||
@announce.command(name="ignore")
|
@announce.command(name="ignore")
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@checks.guildowner_or_permissions(administrator=True)
|
@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.
|
Toggles whether the announcements will ignore the current server.
|
||||||
Defaults to the current server if none is provided.
|
|
||||||
"""
|
"""
|
||||||
if guild is None:
|
ignored = await self.conf.guild(ctx.guild).announce_ignore()
|
||||||
guild = ctx.guild
|
await self.conf.guild(ctx.guild).announce_ignore.set(not ignored)
|
||||||
|
|
||||||
ignored = await self.conf.guild(guild).announce_ignore()
|
|
||||||
await self.conf.guild(guild).announce_ignore.set(not ignored)
|
|
||||||
|
|
||||||
verb = "will" if ignored else "will not"
|
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]:
|
async def _valid_selfroles(self, guild: discord.Guild) -> Tuple[discord.Role]:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user