async def update_guild(pg, guild):
	await pg.execute("INSERT INTO guild(guild_id) VALUES($1) ON CONFLICT DO NOTHING", guild.id)
	for chan in guild.text_channels:
		await pg.execute("INSERT INTO channel(channel_id, guild) VALUES($1, $2) ON CONFLICT DO NOTHING", chan.id, guild.id)