Bug fixes
This commit is contained in:
		@@ -20,7 +20,7 @@ class on_guild_join(commands.Cog, name='On Guild Join Events'):
 | 
				
			|||||||
		status, output = checkConfig(guild)
 | 
							status, output = checkConfig(guild)
 | 
				
			||||||
		conf = yaml_load(configFile)
 | 
							conf = yaml_load(configFile)
 | 
				
			||||||
		if not status:
 | 
							if not status:
 | 
				
			||||||
			await guild.get_channel(conf[str(guild.id)]['channels']['mod']).send(f"The Bot's configurations are incomplete for the guild `{guild.name}`. Some limited functions will still be available, but most features cannot be used until the configurations are complete.\n{parseConfigCheck(output)}\nYou can set these configuration values using the `/config` command.")
 | 
								await guild.get_channel(conf[str(guild.id)]['channels']['mod']).send(f"```The Bot's configurations are incomplete for the guild `{guild.name}`. Some limited functions will still be available, but most features cannot be used until the configurations are complete.\n{parseConfigCheck(output)}\nYou can set these configuration values using the `/config` command.```")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def setup(client):
 | 
					def setup(client):
 | 
				
			||||||
	client.add_cog(on_guild_join(client))
 | 
						client.add_cog(on_guild_join(client))
 | 
				
			||||||
@@ -30,7 +30,7 @@ class Pitch(commands.Cog, name='Pitch Command'):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	@cog_ext.cog_slash(
 | 
						@cog_ext.cog_slash(
 | 
				
			||||||
		name='pitch',
 | 
							name='pitch',
 | 
				
			||||||
		description='Designates the various key roles referenced by the Bot.',
 | 
							description='Initialises the menu for game pitches.',
 | 
				
			||||||
		default_permission=False,
 | 
							default_permission=False,
 | 
				
			||||||
		permissions=permissions,
 | 
							permissions=permissions,
 | 
				
			||||||
		guild_ids=guild_ids,
 | 
							guild_ids=guild_ids,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,9 +61,6 @@ class PlayerCommands(commands.Cog, name='Player Commands'):
 | 
				
			|||||||
			await ctx.send(f'```Error: This is not a valid game role. Please mention a role that is associated with a game.```',hidden=True)
 | 
								await ctx.send(f'```Error: This is not a valid game role. Please mention a role that is associated with a game.```',hidden=True)
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		if not (set(ctx.author.roles) & set([ctx.guild.get_role(x) for x in conf[str(ctx.guild.id)]['roles']['admin']]) or ctx.author == ctx.guild.owner):
 | 
							if not (set(ctx.author.roles) & set([ctx.guild.get_role(x) for x in conf[str(ctx.guild.id)]['roles']['admin']]) or ctx.author == ctx.guild.owner):
 | 
				
			||||||
			if not set(ctx.author.roles) & set([ctx.guild.get_role(int(x)) for x in gms[str(ctx.guild.id)] if gms[str(ctx.guild.id)][x]]):
 | 
					 | 
				
			||||||
				await ctx.send(f'```Error: You are not authorised to issue this command. The command may only be issued by an administrator or by a GM.```',hidden=True)
 | 
					 | 
				
			||||||
				return
 | 
					 | 
				
			||||||
			if ctx.author.id != lookup[guildStr][rStr]['gm']:
 | 
								if ctx.author.id != lookup[guildStr][rStr]['gm']:
 | 
				
			||||||
				await ctx.send(f'```Error: You are not authorised to issue this command. A player may only be added to a game by the GM or by an administrator.```',hidden=True)
 | 
									await ctx.send(f'```Error: You are not authorised to issue this command. A player may only be added to a game by the GM or by an administrator.```',hidden=True)
 | 
				
			||||||
				return
 | 
									return
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user