open to external guilds: disable everything

This commit is contained in:
Amazed 2020-12-29 16:54:30 +01:00
parent 206ea6b8c8
commit 3503f9b14d
1 changed files with 10 additions and 0 deletions

View File

@ -377,6 +377,8 @@ class WynncraftCog(commands.Cog):
@commands.command()
async def connexions(self, ctx):
if ctx.guild.id != 743539323214889030:
return
def td_format(seconds):
periods = [
('an', 60 * 60 * 24 * 365),
@ -417,6 +419,8 @@ class WynncraftCog(commands.Cog):
@commands.command()
@checks.admin_or_permissions(manage_guild=True)
async def ping_channel(self, ctx, channel: TextChannel):
if ctx.guild.id != 743539323214889030:
return
i = channel.id
await self.config.guild(ctx.guild).ping_channel.set(i)
await self.config.guild(ctx.guild).ping_levels.set(True)
@ -425,6 +429,8 @@ class WynncraftCog(commands.Cog):
@commands.command()
@checks.admin_or_permissions(manage_guild=True)
async def ping_levels(self, ctx, state):
if ctx.guild.id != 743539323214889030:
return
if state == "true" or state == "on":
await self.config.ping_levels.set(True)
await ctx.send(":white_check_mark: Activé!")
@ -470,6 +476,8 @@ class WynncraftCog(commands.Cog):
@commands.command()
@checks.admin_or_permissions(manage_guild=True)
async def set_guild(self, ctx, guild_name):
if ctx.guild.id != 743539323214889030:
return
if guild_name == "no":
await self.config.guild(ctx.guild).guild_name.set(False)
await ctx.send(":white_check_mark: Check sur les membres de la guilde désactivé")
@ -524,6 +532,8 @@ class WynncraftCog(commands.Cog):
async def do_loop(self):
await self._log("Looping guilds")
for guild in self.bot.guilds:
if guild.id != 743539323214889030:
continue
roles_combat_level = await self.config.guild(guild).role_levels()
roles_classes = await self.config.guild(guild).role_class()
roles_guild = await self.config.guild(guild).role_guild()