Black formatting
This commit is contained in:
parent
bce07f069f
commit
69e2e5acb3
@ -55,8 +55,8 @@ class InfoChannel(Cog):
|
||||
"channels_channel": "Total Channels: {count}",
|
||||
"online_channel": "Online: {count}",
|
||||
"offline_channel": "Offline:{count}",
|
||||
"role_channel": "{role}: {count}"
|
||||
}
|
||||
"role_channel": "{role}: {count}",
|
||||
},
|
||||
}
|
||||
|
||||
self.config.register_guild(**default_guild)
|
||||
@ -113,7 +113,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@commands.group(aliases=['icset'])
|
||||
@commands.group(aliases=["icset"])
|
||||
@checks.admin()
|
||||
async def infochannelset(self, ctx: commands.Context):
|
||||
"""
|
||||
@ -242,7 +242,9 @@ class InfoChannel(Cog):
|
||||
await ctx.send("InfoChannel for offline user count has been disabled.")
|
||||
|
||||
@infochannelset.command(name="rolecount")
|
||||
async def _infochannelset_rolecount(self, ctx: commands.Context, role: discord.Role, enabled: bool = None):
|
||||
async def _infochannelset_rolecount(
|
||||
self, ctx: commands.Context, role: discord.Role, enabled: bool = None
|
||||
):
|
||||
"""
|
||||
Toggle an infochannel that shows the amount of users in the server with the specified role
|
||||
"""
|
||||
@ -261,7 +263,7 @@ class InfoChannel(Cog):
|
||||
else:
|
||||
await ctx.send(f"InfoChannel for {role.name} count has been disabled.")
|
||||
|
||||
@infochannelset.group(name='name')
|
||||
@infochannelset.group(name="name")
|
||||
async def channelname(self, ctx: commands.Context):
|
||||
"""
|
||||
Change the name of the infochannels
|
||||
@ -269,7 +271,7 @@ class InfoChannel(Cog):
|
||||
if not ctx.invoked_subcommand:
|
||||
pass
|
||||
|
||||
@channelname.command(name='category')
|
||||
@channelname.command(name="category")
|
||||
async def _channelname_Category(self, ctx: commands.Context, *, text):
|
||||
"""
|
||||
Change the name of the infochannel's category.
|
||||
@ -282,7 +284,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='members')
|
||||
@channelname.command(name="members")
|
||||
async def _channelname_Members(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the total members infochannel.
|
||||
@ -306,7 +308,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='humans')
|
||||
@channelname.command(name="humans")
|
||||
async def _channelname_Humans(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the human users infochannel.
|
||||
@ -330,7 +332,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='bots')
|
||||
@channelname.command(name="bots")
|
||||
async def _channelname_Bots(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the bots infochannel.
|
||||
@ -354,7 +356,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='roles')
|
||||
@channelname.command(name="roles")
|
||||
async def _channelname_Roles(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the roles infochannel.
|
||||
@ -380,7 +382,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='channels')
|
||||
@channelname.command(name="channels")
|
||||
async def _channelname_Channels(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the channels infochannel.
|
||||
@ -405,7 +407,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='online')
|
||||
@channelname.command(name="online")
|
||||
async def _channelname_Online(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the online infochannel.
|
||||
@ -429,7 +431,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='offline')
|
||||
@channelname.command(name="offline")
|
||||
async def _channelname_Offline(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the offline infochannel.
|
||||
@ -453,7 +455,7 @@ class InfoChannel(Cog):
|
||||
if not await ctx.tick():
|
||||
await ctx.send("Done!")
|
||||
|
||||
@channelname.command(name='role')
|
||||
@channelname.command(name="role")
|
||||
async def _channelname_Role(self, ctx: commands.Context, *, text=None):
|
||||
"""
|
||||
Change the name of the infochannel for specific roles.
|
||||
@ -538,7 +540,6 @@ class InfoChannel(Cog):
|
||||
)
|
||||
await self.config.guild(guild).humanchannel_id.set(humanchannel.id)
|
||||
|
||||
|
||||
# Remove the old bot channel first
|
||||
botchannel_id = await self.config.guild(guild).botchannel_id()
|
||||
if category_id is not None:
|
||||
@ -552,7 +553,6 @@ class InfoChannel(Cog):
|
||||
)
|
||||
await self.config.guild(guild).botchannel_id.set(botchannel.id)
|
||||
|
||||
|
||||
# Remove the old roles channel first
|
||||
roleschannel_id = await self.config.guild(guild).roleschannel_id()
|
||||
if category_id is not None:
|
||||
@ -567,7 +567,6 @@ class InfoChannel(Cog):
|
||||
)
|
||||
await self.config.guild(guild).roleschannel_id.set(roleschannel.id)
|
||||
|
||||
|
||||
# Remove the old channels channel first
|
||||
channels_channel_id = await self.config.guild(guild).channels_channel_id()
|
||||
if category_id is not None:
|
||||
@ -775,7 +774,6 @@ class InfoChannel(Cog):
|
||||
name = channel_names["role_channel"].format(count=role_num, role=role.name)
|
||||
await rolechannel.edit(reason="InfoChannel update", name=name)
|
||||
|
||||
|
||||
async def update_infochannel_with_cooldown(self, guild):
|
||||
"""My attempt at preventing rate limits, lets see how it goes"""
|
||||
if self._critical_section_wooah_:
|
||||
|
Loading…
x
Reference in New Issue
Block a user